<86>Dec 2 10:51:53 userdel[8578]: delete user 'rooter' <86>Dec 2 10:51:53 userdel[8578]: removed group 'rooter' owned by 'rooter' <86>Dec 2 10:51:53 userdel[8578]: removed shadow group 'rooter' owned by 'rooter' <86>Dec 2 10:51:53 groupadd[8600]: group added to /etc/group: name=rooter, GID=561 <86>Dec 2 10:51:53 groupadd[8600]: group added to /etc/gshadow: name=rooter <86>Dec 2 10:51:53 groupadd[8600]: new group: name=rooter, GID=561 <86>Dec 2 10:51:53 useradd[8615]: new user: name=rooter, UID=561, GID=561, home=/root, shell=/bin/bash <86>Dec 2 10:51:53 userdel[8644]: delete user 'builder' <86>Dec 2 10:51:53 userdel[8644]: removed group 'builder' owned by 'builder' <86>Dec 2 10:51:53 userdel[8644]: removed shadow group 'builder' owned by 'builder' <86>Dec 2 10:51:53 groupadd[8664]: group added to /etc/group: name=builder, GID=562 <86>Dec 2 10:51:53 groupadd[8664]: group added to /etc/gshadow: name=builder <86>Dec 2 10:51:53 groupadd[8664]: new group: name=builder, GID=562 <86>Dec 2 10:51:53 useradd[8680]: new user: name=builder, UID=562, GID=562, home=/usr/src, shell=/bin/bash warning: Macro %_qt5_bindir not found warning: Macro %qmake_qt5 not found warning: Macro %_qt5_bindir not found warning: Macro %_qt5_qmake not found <13>Dec 2 10:51:58 rpmi: qt5-base-common-5.12.5-alt2 sisyphus+241679.100.1.1 1574765435 installed <13>Dec 2 10:51:58 rpmi: libxkbcommon-0.9.1-alt1 sisyphus+239553.100.1.1 1571659627 installed <13>Dec 2 10:51:58 rpmi: libglvnd-7:1.2.0-alt4 sisyphus+241659.100.1.1 1574755345 installed <13>Dec 2 10:51:58 rpmi: qt5-declarative-common-5.12.5-alt2 sisyphus+239426.100.1.1 1571479022 installed <13>Dec 2 10:51:59 rpmi: xorg-proto-devel-2019.1-alt1 sisyphus+232786.100.1.1 1561106722 installed <13>Dec 2 10:51:59 rpmi: libexpat-2.2.4-alt1 1503305345 installed <13>Dec 2 10:51:59 rpmi: qt5-tools-common-5.12.5-alt2 sisyphus+239426.300.1.1 1571480115 installed <13>Dec 2 10:51:59 rpmi: libmtdev-1.1.5-alt1 sisyphus+220715.100.1.1 1549364509 installed <13>Dec 2 10:51:59 rpmi: udev-rules-1:243.4-alt1 sisyphus+241522.200.3.1 1574778986 installed <13>Dec 2 10:51:59 rpmi: libpng16-1.6.37-alt1 sisyphus+236677.100.2.1 1566917998 installed <13>Dec 2 10:51:59 rpmi: libICE-1.0.9-alt1 1409902721 installed <13>Dec 2 10:51:59 rpmi: libXau-1.0.9-alt1 sisyphus+223149.200.2.1 1551268152 installed <13>Dec 2 10:51:59 rpmi: libwayland-server-1.17.0-alt1 sisyphus+225894.100.1.1 1553872805 installed <13>Dec 2 10:51:59 rpmi: libXau-devel-1.0.9-alt1 sisyphus+223149.200.2.1 1551268152 installed <13>Dec 2 10:51:59 rpmi: libSM-1.2.3-alt1 sisyphus+226734.100.2.1 1554586158 installed <13>Dec 2 10:51:59 rpmi: libGLES-7:1.2.0-alt4 sisyphus+241659.100.1.1 1574755345 installed <13>Dec 2 10:51:59 rpmi: libOpenGL-7:1.2.0-alt4 sisyphus+241659.100.1.1 1574755345 installed <13>Dec 2 10:51:59 rpmi: qt5-script-common-5.12.5-alt1 sisyphus+239023.1400.5.2 1571279140 installed <13>Dec 2 10:51:59 rpmi: rpm-macros-qt5-5.12.5-alt2 sisyphus+241679.100.1.1 1574765577 installed <13>Dec 2 10:51:59 rpmi: xxd-4:8.1.2120-alt1 sisyphus+238838.100.1.1 1570455542 installed <13>Dec 2 10:51:59 rpmi: libsqlite3-3.30.1-alt3 sisyphus+242073.100.1.1 1575236094 installed <13>Dec 2 10:51:59 rpmi: libts-1.0-alt1.qa1 1366249315 installed <13>Dec 2 10:51:59 rpmi: libproxy-0.4.15-alt3 sisyphus+227885.100.1.2 1555818599 installed <13>Dec 2 10:51:59 rpmi: libpcre2-10.34-alt1 sisyphus+241619.100.1.1 1574686794 installed <13>Dec 2 10:51:59 rpmi: libjpeg-2:2.0.2-alt1 sisyphus+226996.100.1.1 1554902907 installed <13>Dec 2 10:51:59 rpmi: libwacom-data-1.1-alt1 sisyphus+238155.300.2.1 1569408114 installed <13>Dec 2 10:52:00 rpmi: libicu65-1:6.5.1-alt1 sisyphus+238768.100.16.1 1571427455 installed <13>Dec 2 10:52:00 rpmi: libqt5-core-5.12.5-alt2 sisyphus+241679.100.1.1 1574765435 installed <13>Dec 2 10:52:00 rpmi: libqt5-xml-5.12.5-alt2 sisyphus+241679.100.1.1 1574765435 installed <13>Dec 2 10:52:00 rpmi: libqt5-sql-5.12.5-alt2 sisyphus+241679.100.1.1 1574765435 installed <13>Dec 2 10:52:00 rpmi: libqt5-concurrent-5.12.5-alt2 sisyphus+241679.100.1.1 1574765435 installed <13>Dec 2 10:52:00 rpmi: libqt5-test-5.12.5-alt2 sisyphus+241679.100.1.1 1574765435 installed <13>Dec 2 10:52:00 rpmi: libgudev-1:233-alt1 sisyphus+235422.100.1.1 1564855273 installed <13>Dec 2 10:52:00 rpmi: libwacom-1.1-alt1 sisyphus+238155.300.2.1 1569408208 installed <13>Dec 2 10:52:00 rpmi: libgraphite2-1.3.13-alt2 sisyphus+226799.100.1.1 1554648241 installed <13>Dec 2 10:52:00 rpmi: libharfbuzz-2.6.4-alt1 sisyphus+240033.100.1.1 1572506773 installed <13>Dec 2 10:52:01 rpmi: libfreetype-2.10.1-alt1 sisyphus+237471.100.1.1 1568276356 installed <13>Dec 2 10:52:01 rpmi: fontconfig-2.13.1-alt1 sisyphus+226691.100.2.2 1554598726 installed Updating fonts cache: <29>Dec 2 10:52:02 fontconfig: Updating fonts cache: succeeded [ DONE ] <13>Dec 2 10:52:02 rpmi: libevdev-1.8.0-alt1 sisyphus+236608.100.1.1 1566815743 installed <13>Dec 2 10:52:02 rpmi: libinput-1.14.3-alt1 sisyphus+239829.100.1.1 1572245315 installed <13>Dec 2 10:52:02 rpmi: liblz4-1:1.9.2-alt1 sisyphus+238585.100.2.2 1570066927 installed <13>Dec 2 10:52:02 rpmi: libgpg-error-1.36-alt1 sisyphus+225621.300.1.1 1553521082 installed <13>Dec 2 10:52:02 rpmi: libgcrypt20-1.8.5-alt3 sisyphus+239622.100.1.1 1571746654 installed <13>Dec 2 10:52:02 rpmi: libsystemd-1:243.4-alt1 sisyphus+241522.200.3.1 1574779014 installed <13>Dec 2 10:52:02 rpmi: libdbus-1.12.16-alt2 sisyphus+240566.100.2.1 1573547696 installed <13>Dec 2 10:52:02 rpmi: libavahi-0.7-alt1 sisyphus+237493.100.1.1 1568299481 installed <13>Dec 2 10:52:02 rpmi: libcups-2.2.12-alt3 sisyphus+240570.100.1.1 1573481639 installed <13>Dec 2 10:52:02 rpmi: libqt5-dbus-5.12.5-alt2 sisyphus+241679.100.1.1 1574765435 installed <13>Dec 2 10:52:02 rpmi: libxshmfence-1.3-alt1 sisyphus+223149.1000.2.1 1551268571 installed <13>Dec 2 10:52:02 rpmi: libX11-locales-3:1.6.9-alt1 sisyphus+239210.100.1.1 1571056781 installed <13>Dec 2 10:52:02 rpmi: libXdmcp-1.1.3-alt1 sisyphus+225206.600.1.2 1552949353 installed <13>Dec 2 10:52:02 rpmi: libxcb-1.13.1-alt1 sisyphus+226527.100.2.2 1554593801 installed <13>Dec 2 10:52:02 rpmi: libX11-3:1.6.9-alt1 sisyphus+239210.100.1.1 1571056801 installed <13>Dec 2 10:52:02 rpmi: libXext-1.3.4-alt1 sisyphus+225206.700.1.2 1552949429 installed <13>Dec 2 10:52:02 rpmi: libXxf86vm-1.1.4-alt2 1527672187 installed <13>Dec 2 10:52:02 rpmi: libXdamage-1.1.5-alt1 sisyphus+225206.500.1.2 1552949286 installed <13>Dec 2 10:52:02 rpmi: libXfixes-5.0.3-alt1 sisyphus+226736.100.2.2 1554614841 installed <13>Dec 2 10:52:02 rpmi: libXrender-0.9.8-alt1 1371312112 installed <13>Dec 2 10:52:04 rpmi: libxcb-devel-1.13.1-alt1 sisyphus+226527.100.2.2 1554593801 installed <13>Dec 2 10:52:04 rpmi: libX11-devel-3:1.6.9-alt1 sisyphus+239210.100.1.1 1571056801 installed <13>Dec 2 10:52:04 rpmi: libxcbutil-icccm-0.4.1-alt2 sisyphus+229000.100.1.1 1557152221 installed <13>Dec 2 10:52:04 rpmi: libxcbutil-1:0.4.0-alt1 1413392888 installed <13>Dec 2 10:52:04 rpmi: libxcbutil-image-0.4.0-alt1 1446204182 installed <13>Dec 2 10:52:04 rpmi: libxcbutil-keysyms-0.4.0-alt1 1446204124 installed <13>Dec 2 10:52:04 rpmi: libxcb-render-util-0.3.9-alt3 sisyphus+222674.100.1.1 1550989886 installed <13>Dec 2 10:52:04 rpmi: libxkbcommon-x11-0.9.1-alt1 sisyphus+239553.100.1.1 1571659627 installed <13>Dec 2 10:52:04 rpmi: libwayland-client-1.17.0-alt1 sisyphus+225894.100.1.1 1553872805 installed <13>Dec 2 10:52:04 rpmi: libpciaccess-1:0.16-alt1 sisyphus+234814.100.1.1 1563438291 installed <13>Dec 2 10:52:04 rpmi: libdrm-1:2.4.100-alt1 sisyphus+240099.100.1.1 1572599774 installed <13>Dec 2 10:52:04 rpmi: libGLX-mesa-4:19.2.6-alt2 sisyphus+241659.200.1.1 1574755628 installed <13>Dec 2 10:52:04 rpmi: libgbm-4:19.2.6-alt2 sisyphus+241659.200.1.1 1574755628 installed <13>Dec 2 10:52:04 rpmi: libEGL-mesa-4:19.2.6-alt2 sisyphus+241659.200.1.1 1574755628 installed <13>Dec 2 10:52:04 rpmi: libEGL-7:1.2.0-alt4 sisyphus+241659.100.1.1 1574755345 installed <13>Dec 2 10:52:04 rpmi: libGLX-7:1.2.0-alt4 sisyphus+241659.100.1.1 1574755345 installed <13>Dec 2 10:52:04 rpmi: libGL-7:1.2.0-alt4 sisyphus+241659.100.1.1 1574755345 installed <13>Dec 2 10:52:04 rpmi: libglvnd-devel-7:1.2.0-alt4 sisyphus+241659.100.1.1 1574755345 installed <13>Dec 2 10:52:04 rpmi: gcc-c++-common-1.4.24-alt2 sisyphus+240563.100.1.1 1573475389 installed <13>Dec 2 10:52:05 rpmi: libstdc++9-devel-9.2.1-alt2 sisyphus+240563.200.2.1 1573479396 installed <13>Dec 2 10:52:07 rpmi: gcc9-c++-9.2.1-alt2 sisyphus+240563.200.2.1 1573479396 installed <13>Dec 2 10:52:07 rpmi: gcc-c++-9-alt1 sisyphus+239632.300.3.1 1571788297 installed <13>Dec 2 10:52:08 rpmi: llvm7.0-libs-7.0.1-alt4.rel sisyphus+229878.100.2.1 1558604700 installed <13>Dec 2 10:52:09 rpmi: clang7.0-libs-7.0.1-alt4.rel sisyphus+229878.100.2.1 1558604700 installed <13>Dec 2 10:52:09 rpmi: libp11-kit-0.23.15-alt1 sisyphus+226408.100.2.1 1554288204 installed <13>Dec 2 10:52:09 rpmi: libtasn1-4.15.0-alt1 sisyphus+241940.100.1.1 1574959866 installed <13>Dec 2 10:52:09 rpmi: rpm-macros-alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Dec 2 10:52:09 rpmi: alternatives-0.5.1-alt1 sisyphus+226946.100.1.1 1554830426 installed <13>Dec 2 10:52:09 rpmi: ca-certificates-2019.10.28-alt1 sisyphus+239875.300.1.1 1572267834 installed <13>Dec 2 10:52:09 rpmi: ca-trust-0.1.2-alt1 sisyphus+233348.100.1.1 1561653823 installed <13>Dec 2 10:52:09 rpmi: p11-kit-trust-0.23.15-alt1 sisyphus+226408.100.2.1 1554288204 installed <13>Dec 2 10:52:09 rpmi: libcrypto1.1-1.1.1d-alt1.1 sisyphus+237931.100.2.1 1569235729 installed <13>Dec 2 10:52:09 rpmi: libssl1.1-1.1.1d-alt1.1 sisyphus+237931.100.2.1 1569235729 installed <13>Dec 2 10:52:09 rpmi: libqt5-network-5.12.5-alt2 sisyphus+241679.100.1.1 1574765435 installed <13>Dec 2 10:52:09 rpmi: libqt5-eglfsdeviceintegration-5.12.5-alt2 sisyphus+241679.100.1.1 1574765435 installed <13>Dec 2 10:52:09 rpmi: libqt5-xcbqpa-5.12.5-alt2 sisyphus+241679.100.1.1 1574765435 installed <13>Dec 2 10:52:09 rpmi: libqt5-eglfskmssupport-5.12.5-alt2 sisyphus+241679.100.1.1 1574765435 installed <13>Dec 2 10:52:10 rpmi: libqt5-gui-5.12.5-alt2 sisyphus+241679.100.1.1 1574765435 installed <13>Dec 2 10:52:10 rpmi: libqt5-widgets-5.12.5-alt2 sisyphus+241679.100.1.1 1574765435 installed <13>Dec 2 10:52:10 rpmi: libqt5-quickshapes-5.12.5-alt2 sisyphus+239426.100.1.1 1571479022 installed <13>Dec 2 10:52:10 rpmi: libqt5-quick-5.12.5-alt2 sisyphus+239426.100.1.1 1571479022 installed <13>Dec 2 10:52:10 rpmi: libqt5-qml-5.12.5-alt2 sisyphus+239426.100.1.1 1571479022 installed <13>Dec 2 10:52:11 rpmi: libqt5-designer-5.12.5-alt2 sisyphus+239426.300.1.1 1571479864 installed <13>Dec 2 10:52:11 rpmi: libqt5-designercomponents-5.12.5-alt2 sisyphus+239426.300.1.1 1571479864 installed <13>Dec 2 10:52:11 rpmi: libqt5-help-5.12.5-alt2 sisyphus+239426.300.1.1 1571479864 installed <13>Dec 2 10:52:11 rpmi: qt5-tools-5.12.5-alt2 sisyphus+239426.300.1.1 1571479864 installed <13>Dec 2 10:52:11 rpmi: libqt5-opengl-5.12.5-alt2 sisyphus+241679.100.1.1 1574765435 installed <13>Dec 2 10:52:11 rpmi: libqt5-printsupport-5.12.5-alt2 sisyphus+241679.100.1.1 1574765435 installed <13>Dec 2 10:52:12 rpmi: qt5-base-devel-5.12.5-alt2 sisyphus+241679.100.1.1 1574765435 installed <13>Dec 2 10:52:12 rpmi: libqt5-script-5.12.5-alt1 sisyphus+239023.1400.5.2 1571279240 installed <13>Dec 2 10:52:12 rpmi: qt5-script-devel-5.12.5-alt1 sisyphus+239023.1400.5.2 1571279240 installed <13>Dec 2 10:52:12 rpmi: qt5-tools-devel-5.12.5-alt2 sisyphus+239426.300.1.1 1571479864 installed <13>Dec 2 10:52:12 rpmi: libXext-devel-1.3.4-alt1 sisyphus+225206.700.1.2 1552949429 installed <13>Dec 2 10:52:12 rpmi: zlib-devel-1.2.11-alt1 sisyphus+221902.6000.4.1 1550601058 installed Building target platforms: i586 Building for target i586 Wrote: /usr/src/in/nosrpm/kde5-smplayer-19.5.0.9214-alt1.nosrc.rpm Installing kde5-smplayer-19.5.0.9214-alt1.src.rpm Building target platforms: i586 Building for target i586 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.23647 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf smplayer-19.5.0.9214 + echo 'Source #0 (smplayer-19.5.0.9214.tar):' Source #0 (smplayer-19.5.0.9214.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/smplayer-19.5.0.9214.tar + cd smplayer-19.5.0.9214 + /bin/chmod -c -Rf u+rwX,go-w . + echo 'Patch #1 (alt-defines.patch):' Patch #1 (alt-defines.patch): + /usr/bin/patch -p1 patching file src/smplayer.pro patching file Makefile Hunk #1 succeeded at 24 with fuzz 1 (offset -16 lines). patching file src/basegui.cpp Hunk #1 succeeded at 256 (offset -5 lines). patching file src/basegui.h + echo 'Patch #2 (alt-defaults.patch):' Patch #2 (alt-defaults.patch): + /usr/bin/patch -p1 patching file src/preferences.cpp Hunk #1 succeeded at 128 with fuzz 2 (offset 10 lines). Hunk #2 succeeded at 257 (offset 23 lines). Hunk #3 succeeded at 1856 (offset 141 lines). + echo 'Patch #3 (alt-ui-defaults.patch):' Patch #3 (alt-ui-defaults.patch): + /usr/bin/patch -p1 patching file src/defaultgui.cpp Hunk #1 succeeded at 284 (offset 50 lines). Hunk #2 succeeded at 393 (offset 85 lines). Hunk #3 succeeded at 431 (offset 85 lines). Hunk #4 succeeded at 515 (offset 98 lines). + echo 'Patch #4 (alt-paths.patch):' Patch #4 (alt-paths.patch): + /usr/bin/patch -p1 patching file src/paths.cpp patching file src/chromecast.cpp Hunk #1 succeeded at 340 (offset 111 lines). + echo 'Patch #5 (alt-youtube-browser.patch):' Patch #5 (alt-youtube-browser.patch): + /usr/bin/patch -p1 patching file src/basegui.cpp Hunk #1 succeeded at 6219 (offset 387 lines). Hunk #2 succeeded at 6243 (offset 387 lines). + sed -i 's|@APP_PREFIX@|kde5|' src/paths.cpp + sed -i 's|@APP_PREFIX@|kde5|' src/chromecast.cpp + export PATH=/usr/share/qt5/bin:/usr/src/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games + PATH=/usr/share/qt5/bin:/usr/src/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games + sed -i 's|^PREFIX=.*|PREFIX=/usr|' Makefile + sed -i 's|^DATA_PATH=.*|DATA_PATH=/usr/share/kde5-smplayer|' Makefile + sed -i 's|^TRANSLATION_PATH=.*|TRANSLATION_PATH=/usr/share/kde5-smplayer/translations|' Makefile + sed -i 's|^DOC_PATH=.*|DOC_PATH=/usr/share/doc/kde5-smplayer-19.5.0.9214|' Makefile + sed -i 's|^THEMES_PATH=.*|THEMES_PATH=/usr/share/smplayer/themes|' Makefile + sed -i 's|^SHORTCUTS_PATH=.*|SHORTCUTS_PATH=/usr/share/kde5-smplayer/shortcuts|' Makefile + pushd src ~/RPM/BUILD/smplayer-19.5.0.9214/src ~/RPM/BUILD/smplayer-19.5.0.9214 + echo '#define SVN_REVISION "9214"' + __qmake_qt5 smplayer.pro + export 'CPPFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC' + CPPFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC' + /usr/share/qt5/bin/qmake 'QMAKE_CFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC' 'QMAKE_CXXFLAGS=-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC' smplayer.pro Info: creating stash file /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.qmake.stash Project MESSAGE: This project is using private headers and will therefore be tied to this specific Qt module build version. Project MESSAGE: Running this project against other versions of the Qt modules may crash at any arbitrary point. Project MESSAGE: This is not a bug, but a result of using Qt internals. You have been warned! + popd ~/RPM/BUILD/smplayer-19.5.0.9214 + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.49726 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd smplayer-19.5.0.9214 + export PATH=/usr/share/qt5/bin:/usr/src/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games + PATH=/usr/share/qt5/bin:/usr/src/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games + export QMAKE=/usr/share/qt5/bin/qmake + QMAKE=/usr/share/qt5/bin/qmake + make -j8 src/smplayer make: Entering directory '/usr/src/RPM/BUILD/smplayer-19.5.0.9214' cd src && DATA_PATH=\\\"/usr/share/kde5-smplayer\\\" TRANSLATION_PATH=\\\"/usr/share/kde5-smplayer/translations\\\" DOC_PATH=\\\"/usr/share/doc/kde5-smplayer-19.5.0.9214\\\" THEMES_PATH=\\\"/usr/share/smplayer/themes\\\" SHORTCUTS_PATH=\\\"/usr/share/kde5-smplayer/shortcuts\\\" make make[1]: Entering directory '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src' make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. make[1]: Leaving directory '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src' make[1]: Entering directory '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src' /usr/share/qt5/bin/uic inputdvddirectory.ui -o .ui/ui_inputdvddirectory.h /usr/share/qt5/bin/uic logwindow.ui -o .ui/ui_logwindow.h /usr/share/qt5/bin/uic infowindow.ui -o .ui/ui_infowindow.h /usr/share/qt5/bin/uic filepropertiesdialog.ui -o .ui/ui_filepropertiesdialog.h /usr/share/qt5/bin/uic eqslider.ui -o .ui/ui_eqslider.h /usr/share/qt5/bin/uic seekwidget.ui -o .ui/ui_seekwidget.h /usr/share/qt5/bin/uic inputurl.ui -o .ui/ui_inputurl.h /usr/share/qt5/bin/uic videoequalizer.ui -o .ui/ui_videoequalizer.h /usr/share/qt5/bin/uic vdpauproperties.ui -o .ui/ui_vdpauproperties.h /usr/share/qt5/bin/uic preferencesdialog.ui -o .ui/ui_preferencesdialog.h /usr/share/qt5/bin/uic prefgeneral.ui -o .ui/ui_prefgeneral.h /usr/share/qt5/bin/uic prefdrives.ui -o .ui/ui_prefdrives.h /usr/share/qt5/bin/uic prefinterface.ui -o .ui/ui_prefinterface.h /usr/share/qt5/bin/uic prefperformance.ui -o .ui/ui_prefperformance.h /usr/share/qt5/bin/uic prefinput.ui -o .ui/ui_prefinput.h /usr/share/qt5/bin/uic prefsubtitles.ui -o .ui/ui_prefsubtitles.h /usr/share/qt5/bin/uic prefadvanced.ui -o .ui/ui_prefadvanced.h /usr/share/qt5/bin/uic prefplaylist.ui -o .ui/ui_prefplaylist.h /usr/share/qt5/bin/uic prefupdates.ui -o .ui/ui_prefupdates.h /usr/share/qt5/bin/uic prefnetwork.ui -o .ui/ui_prefnetwork.h /usr/share/qt5/bin/uic favoriteeditor.ui -o .ui/ui_favoriteeditor.h /usr/share/qt5/bin/uic about.ui -o .ui/ui_about.h /usr/share/qt5/bin/uic inputmplayerversion.ui -o .ui/ui_inputmplayerversion.h /usr/share/qt5/bin/uic errordialog.ui -o .ui/ui_errordialog.h /usr/share/qt5/bin/uic timedialog.ui -o .ui/ui_timedialog.h /usr/share/qt5/bin/uic stereo3ddialog.ui -o .ui/ui_stereo3ddialog.h /usr/share/qt5/bin/uic toolbareditor.ui -o .ui/ui_toolbareditor.h /usr/share/qt5/bin/uic multilineinputdialog.ui -o .ui/ui_multilineinputdialog.h /usr/share/qt5/bin/uic preftv.ui -o .ui/ui_preftv.h /usr/share/qt5/bin/uic findsubtitles/findsubtitleswindow.ui -o .ui/ui_findsubtitleswindow.h /usr/share/qt5/bin/uic findsubtitles/findsubtitlesconfigdialog.ui -o .ui/ui_findsubtitlesconfigdialog.h /usr/share/qt5/bin/uic findsubtitles/subchooserdialog.ui -o .ui/ui_subchooserdialog.h /usr/share/qt5/bin/uic skingui/mediapanel.ui -o .ui/ui_mediapanel.h /usr/share/qt5/bin/uic skingui/mediabarpanel.ui -o .ui/ui_mediabarpanel.h /usr/share/qt5/bin/uic videopreview/videopreviewconfigdialog.ui -o .ui/ui_videopreviewconfigdialog.h /usr/share/qt5/bin/uic inputbookmark.ui -o .ui/ui_inputbookmark.h /usr/share/qt5/bin/uic bookmarkdialog.ui -o .ui/ui_bookmarkdialog.h /usr/share/qt5/bin/uic globalshortcuts/globalshortcutsdialog.ui -o .ui/ui_globalshortcutsdialog.h /usr/share/qt5/bin/uic qrcode/openwithdevicedialog.ui -o .ui/ui_openwithdevicedialog.h g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/version.o version.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/global.o global.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/paths.o paths.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/chapters.o chapters.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/helper.o helper.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/colorutils.o colorutils.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/translator.o translator.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/subtracks.o subtracks.cpp subtracks.cpp: In member function 'void SubTracks::list()': subtracks.cpp:46:27: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare] 46 | for (unsigned int n=0; n < subs.count(); n++) { | ~~^~~~~~~~~~~~~~ subtracks.cpp: In member function 'void SubTracks::listNames()': subtracks.cpp:54:27: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare] 54 | for (unsigned int n=0; n < subs.count(); n++) { | ~~^~~~~~~~~~~~~~ subtracks.cpp: In member function 'int SubTracks::find(SubData::Type, int)': subtracks.cpp:118:27: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare] 118 | for (unsigned int n=0; n < subs.count(); n++) { | ~~^~~~~~~~~~~~~~ g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/tracks.o tracks.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/titletracks.o titletracks.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/discname.o discname.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/extensions.o extensions.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/desktopinfo.o desktopinfo.cpp g++ -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -dM -E -o .moc/moc_predefs.h /usr/lib/qt5/mkspecs/features/data/dummy.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include myprocess.h -o .moc/moc_myprocess.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/myprocess.o myprocess.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/mplayerversion.o mplayerversion.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/playerid.o playerid.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include playerprocess.h -o .moc/moc_playerprocess.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/playerprocess.o playerprocess.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/infoprovider.o infoprovider.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include mplayerwindow.h -o .moc/moc_mplayerwindow.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/mplayerwindow.o mplayerwindow.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/mediadata.o mediadata.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/audioequalizerlist.o audioequalizerlist.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/mediasettings.o mediasettings.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/assstyles.o assstyles.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include filters.h -o .moc/moc_filters.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/filters.o filters.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/preferences.o preferences.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/filesettingsbase.o filesettingsbase.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/filesettings.o filesettings.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/filesettingshash.o filesettingshash.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/filehash.o filehash.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/images.o images.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include inforeader.h -o .moc/moc_inforeader.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/inforeader.o inforeader.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/deviceinfo.o deviceinfo.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/recents.o recents.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/urlhistory.o urlhistory.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include core.h -o .moc/moc_core.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/core.o core.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/myscroller.o myscroller.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include logwindow.h -o .moc/moc_logwindow.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/logwindow.o logwindow.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include infowindow.h -o .moc/moc_infowindow.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/infowindow.o infowindow.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include infofile.h -o .moc/moc_infofile.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/infofile.o infofile.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include seekwidget.h -o .moc/moc_seekwidget.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/seekwidget.o seekwidget.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/mytablewidget.o mytablewidget.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include shortcutgetter.h -o .moc/moc_shortcutgetter.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/shortcutgetter.o shortcutgetter.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include actionseditor.h -o .moc/moc_actionseditor.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/actionseditor.o actionseditor.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include filechooser.h -o .moc/moc_filechooser.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/filechooser.o filechooser.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include vdpauproperties.h -o .moc/moc_vdpauproperties.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/vdpauproperties.o vdpauproperties.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include preferencesdialog.h -o .moc/moc_preferencesdialog.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/preferencesdialog.o preferencesdialog.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include lineedit_with_icon.h -o .moc/moc_lineedit_with_icon.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/lineedit_with_icon.o lineedit_with_icon.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include mylineedit.h -o .moc/moc_mylineedit.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/mylineedit.o mylineedit.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/mycombobox.o mycombobox.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include tristatecombo.h -o .moc/moc_tristatecombo.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/tristatecombo.o tristatecombo.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include languages.h -o .moc/moc_languages.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/languages.o languages.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include selectcolorbutton.h -o .moc/moc_selectcolorbutton.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/selectcolorbutton.o selectcolorbutton.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/prefwidget.o prefwidget.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include prefgeneral.h -o .moc/moc_prefgeneral.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/prefgeneral.o prefgeneral.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include prefdrives.h -o .moc/moc_prefdrives.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/prefdrives.o prefdrives.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include prefinterface.h -o .moc/moc_prefinterface.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/prefinterface.o prefinterface.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include prefperformance.h -o .moc/moc_prefperformance.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/prefperformance.o prefperformance.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include prefinput.h -o .moc/moc_prefinput.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/prefinput.o prefinput.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include prefsubtitles.h -o .moc/moc_prefsubtitles.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/prefsubtitles.o prefsubtitles.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include prefadvanced.h -o .moc/moc_prefadvanced.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/prefadvanced.o prefadvanced.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include prefplaylist.h -o .moc/moc_prefplaylist.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/prefplaylist.o prefplaylist.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include prefupdates.h -o .moc/moc_prefupdates.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/prefupdates.o prefupdates.cpp prefupdates.cpp: In member function 'void PrefUpdates::setData(Preferences*)': prefupdates.cpp:58:41: warning: unused parameter 'pref' [-Wunused-parameter] 58 | void PrefUpdates::setData(Preferences * pref) { | ~~~~~~~~~~~~~~^~~~ prefupdates.cpp: In member function 'void PrefUpdates::getData(Preferences*)': prefupdates.cpp:69:41: warning: unused parameter 'pref' [-Wunused-parameter] 69 | void PrefUpdates::getData(Preferences * pref) { | ~~~~~~~~~~~~~~^~~~ /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include prefnetwork.h -o .moc/moc_prefnetwork.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/prefnetwork.o prefnetwork.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include filepropertiesdialog.h -o .moc/moc_filepropertiesdialog.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/filepropertiesdialog.o filepropertiesdialog.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include multilineinputdialog.h -o .moc/moc_multilineinputdialog.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/multilineinputdialog.o multilineinputdialog.cpp multilineinputdialog.cpp: In member function 'void MultilineInputDialog::setLines(const QStringList&)': multilineinputdialog.cpp:29:57: warning: unused parameter 'lines' [-Wunused-parameter] 29 | void MultilineInputDialog::setLines(const QStringList & lines) { | ~~~~~~~~~~~~~~~~~~~~^~~~~ /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include playlist.h -o .moc/moc_playlist.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/playlist.o playlist.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include playlistdock.h -o .moc/moc_playlistdock.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/playlistdock.o playlistdock.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/verticaltext.o verticaltext.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include eqslider.h -o .moc/moc_eqslider.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/eqslider.o eqslider.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include videoequalizer.h -o .moc/moc_videoequalizer.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/videoequalizer.o videoequalizer.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include audioequalizer.h -o .moc/moc_audioequalizer.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/audioequalizer.o audioequalizer.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include myslider.h -o .moc/moc_myslider.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/myslider.o myslider.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include timeslider.h -o .moc/moc_timeslider.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/timeslider.o timeslider.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include inputdvddirectory.h -o .moc/moc_inputdvddirectory.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/inputdvddirectory.o inputdvddirectory.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include inputurl.h -o .moc/moc_inputurl.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/inputurl.o inputurl.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include stereo3ddialog.h -o .moc/moc_stereo3ddialog.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/stereo3ddialog.o stereo3ddialog.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/myaction.o myaction.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include myactiongroup.h -o .moc/moc_myactiongroup.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/myactiongroup.o myactiongroup.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/filedialog.o filedialog.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include inputmplayerversion.h -o .moc/moc_inputmplayerversion.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/inputmplayerversion.o inputmplayerversion.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include about.h -o .moc/moc_about.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/about.o about.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include errordialog.h -o .moc/moc_errordialog.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/errordialog.o errordialog.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include timedialog.h -o .moc/moc_timedialog.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/timedialog.o timedialog.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include favorites.h -o .moc/moc_favorites.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/favorites.o favorites.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include favoriteeditor.h -o .moc/moc_favoriteeditor.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/favoriteeditor.o favoriteeditor.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include statewidget.h -o .moc/moc_statewidget.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/statewidget.o statewidget.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include basegui.h -o .moc/moc_basegui.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/basegui.o basegui.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include baseguiplus.h -o .moc/moc_baseguiplus.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/baseguiplus.o baseguiplus.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include autohidewidget.h -o .moc/moc_autohidewidget.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/autohidewidget.o autohidewidget.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include widgetactions.h -o .moc/moc_widgetactions.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/widgetactions.o widgetactions.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include toolbareditor.h -o .moc/moc_toolbareditor.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/toolbareditor.o toolbareditor.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include editabletoolbar.h -o .moc/moc_editabletoolbar.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/editabletoolbar.o editabletoolbar.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/clhelp.o clhelp.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/cleanconfig.o cleanconfig.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include smplayer.h -o .moc/moc_smplayer.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/smplayer.o smplayer.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include myapplication.h -o .moc/moc_myapplication.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/myapplication.o myapplication.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/main.o main.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include tvlist.h -o .moc/moc_tvlist.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/tvlist.o tvlist.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include preftv.h -o .moc/moc_preftv.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/preftv.o preftv.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/tvsettings.o tvsettings.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include mpvprocess.h -o .moc/moc_mpvprocess.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/mpvprocess.o mpvprocess.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include inforeadermpv.h -o .moc/moc_inforeadermpv.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/inforeadermpv.o inforeadermpv.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include mplayerprocess.h -o .moc/moc_mplayerprocess.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/mplayerprocess.o mplayerprocess.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include inforeadermplayer.h -o .moc/moc_inforeadermplayer.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/inforeadermplayer.o inforeadermplayer.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/qtsingleapplication.o qtsingleapplication/qtsingleapplication.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/qtlocalpeer.o qtsingleapplication/qtlocalpeer.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include findsubtitles/findsubtitlesconfigdialog.h -o .moc/moc_findsubtitlesconfigdialog.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/findsubtitlesconfigdialog.o findsubtitles/findsubtitlesconfigdialog.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include findsubtitles/findsubtitleswindow.h -o .moc/moc_findsubtitleswindow.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/findsubtitleswindow.o findsubtitles/findsubtitleswindow.cpp findsubtitles/findsubtitleswindow.cpp: In member function 'QByteArray FindSubtitlesWindow::gUncompress(const QByteArray&)': findsubtitles/findsubtitleswindow.cpp:634:17: warning: this statement may fall through [-Wimplicit-fallthrough=] 634 | ret = Z_DATA_ERROR; // and fall through | ^ findsubtitles/findsubtitleswindow.cpp:635:9: note: here 635 | case Z_DATA_ERROR: | ^~~~ /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include findsubtitles/maia/maiaObject.h -o .moc/moc_maiaObject.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/maiaObject.o findsubtitles/maia/maiaObject.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include findsubtitles/maia/maiaFault.h -o .moc/moc_maiaFault.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/maiaFault.o findsubtitles/maia/maiaFault.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include findsubtitles/maia/maiaXmlRpcClient.h -o .moc/moc_maiaXmlRpcClient.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/maiaXmlRpcClient.o findsubtitles/maia/maiaXmlRpcClient.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include findsubtitles/osclient.h -o .moc/moc_osclient.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/osclient.o findsubtitles/osclient.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include findsubtitles/filedownloader/filedownloader.h -o .moc/moc_filedownloader.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/filedownloader.o findsubtitles/filedownloader/filedownloader.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include findsubtitles/subchooserdialog.h -o .moc/moc_subchooserdialog.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/subchooserdialog.o findsubtitles/subchooserdialog.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/fixsubs.o findsubtitles/fixsubs.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include youtube/retrieveyoutubeurl.h -o .moc/moc_retrieveyoutubeurl.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/retrieveyoutubeurl.o youtube/retrieveyoutubeurl.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include youtube/loadpage.h -o .moc/moc_loadpage.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/loadpage.o youtube/loadpage.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/sig.o youtube/sig.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include defaultgui.h -o .moc/moc_defaultgui.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/defaultgui.o defaultgui.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include minigui.h -o .moc/moc_minigui.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/minigui.o minigui.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include mpcgui/mpcgui.h -o .moc/moc_mpcgui.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/mpcgui.o mpcgui/mpcgui.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include mpcgui/mpcstyles.h -o .moc/moc_mpcstyles.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/mpcstyles.o mpcgui/mpcstyles.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/myicon.o skingui/myicon.cpp skingui/myicon.cpp: In member function 'void MyIcon::setPixmap(QPixmap, MyIcon::Mode, MyIcon::State)': skingui/myicon.cpp:34:9: warning: this 'else' clause does not guard... [-Wmisleading-indentation] 34 | else normalPixOn = pix; break; | ^~~~ skingui/myicon.cpp:34:33: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else' 34 | else normalPixOn = pix; break; | ^~~~~ skingui/myicon.cpp:37:9: warning: this 'else' clause does not guard... [-Wmisleading-indentation] 37 | else mouseOverPixOn = pix; break; | ^~~~ skingui/myicon.cpp:37:36: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else' 37 | else mouseOverPixOn = pix; break; | ^~~~~ skingui/myicon.cpp:40:9: warning: this 'else' clause does not guard... [-Wmisleading-indentation] 40 | else mouseDownPixOn = pix; break; | ^~~~ skingui/myicon.cpp:40:36: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else' 40 | else mouseDownPixOn = pix; break; | ^~~~~ skingui/myicon.cpp:43:9: warning: this 'else' clause does not guard... [-Wmisleading-indentation] 43 | else disabledPixOn = pix;break; | ^~~~ skingui/myicon.cpp:43:34: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else' 43 | else disabledPixOn = pix;break; | ^~~~~ /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include skingui/mybutton.h -o .moc/moc_mybutton.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/mybutton.o skingui/mybutton.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include skingui/panelseeker.h -o .moc/moc_panelseeker.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/panelseeker.o skingui/panelseeker.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include skingui/playcontrol.h -o .moc/moc_playcontrol.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/playcontrol.o skingui/playcontrol.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include skingui/mediapanel.h -o .moc/moc_mediapanel.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/mediapanel.o skingui/mediapanel.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include skingui/volumecontrolpanel.h -o .moc/moc_volumecontrolpanel.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/volumecontrolpanel.o skingui/volumecontrolpanel.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include skingui/mediabarpanel.h -o .moc/moc_mediabarpanel.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/mediabarpanel.o skingui/mediabarpanel.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include skingui/qpropertysetter.h -o .moc/moc_qpropertysetter.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/qpropertysetter.o skingui/qpropertysetter.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/actiontools.o skingui/actiontools.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include skingui/skingui.h -o .moc/moc_skingui.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/skingui.o skingui/skingui.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include mpris2/mediaplayer2.h -o .moc/moc_mediaplayer2.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/mediaplayer2.o mpris2/mediaplayer2.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include mpris2/mediaplayer2player.h -o .moc/moc_mediaplayer2player.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/mediaplayer2player.o mpris2/mediaplayer2player.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include mpris2/mpris2.h -o .moc/moc_mpris2.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/mpris2.o mpris2/mpris2.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include videopreview/videopreview.h -o .moc/moc_videopreview.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/videopreview.o videopreview/videopreview.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include videopreview/videopreviewconfigdialog.h -o .moc/moc_videopreviewconfigdialog.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/videopreviewconfigdialog.o videopreview/videopreviewconfigdialog.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include inputbookmark.h -o .moc/moc_inputbookmark.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/inputbookmark.o inputbookmark.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include bookmarkdialog.h -o .moc/moc_bookmarkdialog.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/bookmarkdialog.o bookmarkdialog.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include globalshortcuts/globalshortcuts.h -o .moc/moc_globalshortcuts.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/globalshortcuts.o globalshortcuts/globalshortcuts.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include globalshortcuts/globalshortcutsdialog.h -o .moc/moc_globalshortcutsdialog.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/globalshortcutsdialog.o globalshortcuts/globalshortcutsdialog.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/hdpisupport.o hdpisupport.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include chromecast.h -o .moc/moc_chromecast.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/chromecast.o chromecast.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/subreader.o subreader.cpp gcc -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -std=c99 -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/qrcodegen.o qrcode/qrcodegen.c /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include qrcode/qrcodelabel.h -o .moc/moc_qrcodelabel.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/qrcodelabel.o qrcode/qrcodelabel.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include qrcode/openwithdevicedialog.h -o .moc/moc_openwithdevicedialog.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/openwithdevicedialog.o qrcode/openwithdevicedialog.cpp /usr/share/qt5/bin/rcc -name icons icons.qrc -o qrc_icons.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/qrc_icons.o qrc_icons.cpp /usr/share/qt5/bin/rcc -name H2O H2O.qrc -o qrc_H2O.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/qrc_H2O.o qrc_H2O.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include qtsingleapplication/qtsingleapplication.h -o .moc/moc_qtsingleapplication.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/moc_qtsingleapplication.o .moc/moc_qtsingleapplication.cpp /usr/share/qt5/bin/moc -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB --include /usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/.moc/moc_predefs.h -I/usr/lib/qt5/mkspecs/linux-g++ -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/qtsingleapplication -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/maia -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/findsubtitles/filedownloader -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/youtube -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpcgui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/skingui -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/mpris2 -I/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/videopreview -I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui/5.12.5 -I/usr/include/qt5/QtGui/5.12.5/QtGui -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtCore/5.12.5 -I/usr/include/qt5/QtCore/5.12.5/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/9 -I/usr/include/c++/9/i586-alt-linux -I/usr/include/c++/9/backward -I/usr/lib/gcc/i586-alt-linux/9/include -I/usr/local/include -I/usr/include qtsingleapplication/qtlocalpeer.h -o .moc/moc_qtlocalpeer.cpp g++ -c -pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic -fPIC -DPIC -O2 -Wall -W -D_REENTRANT -fPIC -DSINGLE_INSTANCE -DFIND_SUBTITLES -DVIDEOPREVIEW -DYOUTUBE_SUPPORT -DBLURAY_SUPPORT -DTV_SUPPORT -DGUI_CHANGE_ON_RUNTIME -DLOG_MPLAYER -DLOG_SMPLAYER -DDEFAULTGUI -DMINIGUI -DMPCGUI -DSKINS -DMPRIS2 -DBOOKMARKS -DMOUSE_GESTURES -DGLOBALSHORTCUTS -DADD_BLACKBORDERS_FS -DINITIAL_BLACKBORDERS -DCHROMECAST_SUPPORT -DUSE_QRCODE -DMPV_SUPPORT -DMPLAYER_SUPPORT -DMPLAYER2_SUPPORT -DHDPI_SUPPORT -DDOWNLOAD_SUBS -DYT_USE_SIG -DDATA_PATH=\"/usr/share/kde5-smplayer\" -DDOC_PATH=\"/usr/share/doc/kde5-smplayer-19.5.0.9214\" -DTRANSLATION_PATH=\"/usr/share/kde5-smplayer/translations\" -DTHEMES_PATH=\"/usr/share/smplayer/themes\" -DSHORTCUTS_PATH=\"/usr/share/kde5-smplayer/shortcuts\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Iqtsingleapplication -Ifindsubtitles -Ifindsubtitles/maia -Ifindsubtitles/filedownloader -Iyoutube -Impcgui -Iskingui -Impris2 -Ivideopreview -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui/5.12.5 -isystem /usr/include/qt5/QtGui/5.12.5/QtGui -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtScript -isystem /usr/include/qt5/QtDBus -isystem /usr/include/qt5/QtCore/5.12.5 -isystem /usr/include/qt5/QtCore/5.12.5/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I.ui -I/usr/lib/qt5/mkspecs/linux-g++ -o .obj/moc_qtlocalpeer.o .moc/moc_qtlocalpeer.cpp g++ -Wl,-O1 -o smplayer .obj/version.o .obj/global.o .obj/paths.o .obj/chapters.o .obj/helper.o .obj/colorutils.o .obj/translator.o .obj/subtracks.o .obj/tracks.o .obj/titletracks.o .obj/discname.o .obj/extensions.o .obj/desktopinfo.o .obj/myprocess.o .obj/mplayerversion.o .obj/playerid.o .obj/playerprocess.o .obj/infoprovider.o .obj/mplayerwindow.o .obj/mediadata.o .obj/audioequalizerlist.o .obj/mediasettings.o .obj/assstyles.o .obj/filters.o .obj/preferences.o .obj/filesettingsbase.o .obj/filesettings.o .obj/filesettingshash.o .obj/filehash.o .obj/images.o .obj/inforeader.o .obj/deviceinfo.o .obj/recents.o .obj/urlhistory.o .obj/core.o .obj/myscroller.o .obj/logwindow.o .obj/infowindow.o .obj/infofile.o .obj/seekwidget.o .obj/mytablewidget.o .obj/shortcutgetter.o .obj/actionseditor.o .obj/filechooser.o .obj/vdpauproperties.o .obj/preferencesdialog.o .obj/lineedit_with_icon.o .obj/mylineedit.o .obj/mycombobox.o .obj/tristatecombo.o .obj/languages.o .obj/selectcolorbutton.o .obj/prefwidget.o .obj/prefgeneral.o .obj/prefdrives.o .obj/prefinterface.o .obj/prefperformance.o .obj/prefinput.o .obj/prefsubtitles.o .obj/prefadvanced.o .obj/prefplaylist.o .obj/prefupdates.o .obj/prefnetwork.o .obj/filepropertiesdialog.o .obj/multilineinputdialog.o .obj/playlist.o .obj/playlistdock.o .obj/verticaltext.o .obj/eqslider.o .obj/videoequalizer.o .obj/audioequalizer.o .obj/myslider.o .obj/timeslider.o .obj/inputdvddirectory.o .obj/inputurl.o .obj/stereo3ddialog.o .obj/myaction.o .obj/myactiongroup.o .obj/filedialog.o .obj/inputmplayerversion.o .obj/about.o .obj/errordialog.o .obj/timedialog.o .obj/favorites.o .obj/favoriteeditor.o .obj/statewidget.o .obj/basegui.o .obj/baseguiplus.o .obj/autohidewidget.o .obj/widgetactions.o .obj/toolbareditor.o .obj/editabletoolbar.o .obj/clhelp.o .obj/cleanconfig.o .obj/smplayer.o .obj/myapplication.o .obj/main.o .obj/tvlist.o .obj/preftv.o .obj/tvsettings.o .obj/mpvprocess.o .obj/inforeadermpv.o .obj/mplayerprocess.o .obj/inforeadermplayer.o .obj/qtsingleapplication.o .obj/qtlocalpeer.o .obj/findsubtitlesconfigdialog.o .obj/findsubtitleswindow.o .obj/maiaObject.o .obj/maiaFault.o .obj/maiaXmlRpcClient.o .obj/osclient.o .obj/filedownloader.o .obj/subchooserdialog.o .obj/fixsubs.o .obj/retrieveyoutubeurl.o .obj/loadpage.o .obj/sig.o .obj/defaultgui.o .obj/minigui.o .obj/mpcgui.o .obj/mpcstyles.o .obj/myicon.o .obj/mybutton.o .obj/panelseeker.o .obj/playcontrol.o .obj/mediapanel.o .obj/volumecontrolpanel.o .obj/mediabarpanel.o .obj/qpropertysetter.o .obj/actiontools.o .obj/skingui.o .obj/mediaplayer2.o .obj/mediaplayer2player.o .obj/mpris2.o .obj/videopreview.o .obj/videopreviewconfigdialog.o .obj/inputbookmark.o .obj/bookmarkdialog.o .obj/globalshortcuts.o .obj/globalshortcutsdialog.o .obj/hdpisupport.o .obj/chromecast.o .obj/subreader.o .obj/qrcodegen.o .obj/qrcodelabel.o .obj/openwithdevicedialog.o .obj/qrc_icons.o .obj/qrc_H2O.o .obj/moc_qtsingleapplication.o .obj/moc_qtlocalpeer.o -lz -lXext -lX11 -lm /usr/lib/libQt5Widgets.so /usr/lib/libQt5Gui.so /usr/lib/libQt5Network.so /usr/lib/libQt5Xml.so /usr/lib/libQt5Script.so /usr/lib/libQt5DBus.so /usr/lib/libQt5Core.so /usr/lib/libGL.so -lpthread make[1]: Leaving directory '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src' cd src && lrelease smplayer.pro Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_es.qm'... Generated 2108 translation(s) (2108 finished and 0 unfinished) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_de.qm'... Generated 2108 translation(s) (2108 finished and 0 unfinished) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_sk.qm'... Generated 860 translation(s) (822 finished and 38 unfinished) Ignored 1248 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_it.qm'... Generated 2108 translation(s) (2108 finished and 0 unfinished) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_fr.qm'... Generated 2103 translation(s) (2103 finished and 0 unfinished) Ignored 5 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_zh_CN.qm'... Generated 2103 translation(s) (2103 finished and 0 unfinished) Ignored 5 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_ru_RU.qm'... Generated 2108 translation(s) (2108 finished and 0 unfinished) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_hu.qm'... Generated 1825 translation(s) (1814 finished and 11 unfinished) Ignored 283 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_en.qm'... Generated 1 translation(s) (1 finished and 0 unfinished) Ignored 2107 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_pl.qm'... Generated 2108 translation(s) (2108 finished and 0 unfinished) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_ja.qm'... Generated 2108 translation(s) (2108 finished and 0 unfinished) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_nl.qm'... Generated 2083 translation(s) (2083 finished and 0 unfinished) Ignored 25 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_uk_UA.qm'... Generated 2103 translation(s) (2103 finished and 0 unfinished) Ignored 5 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_pt_BR.qm'... Generated 2108 translation(s) (2108 finished and 0 unfinished) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_ka.qm'... Generated 356 translation(s) (132 finished and 224 unfinished) Ignored 1752 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_cs.qm'... Generated 2108 translation(s) (2108 finished and 0 unfinished) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_bg.qm'... Generated 2005 translation(s) (2002 finished and 3 unfinished) Ignored 103 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_tr.qm'... Generated 1826 translation(s) (1823 finished and 3 unfinished) Ignored 282 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_sv.qm'... Generated 432 translation(s) (224 finished and 208 unfinished) Ignored 1676 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_sr.qm'... Generated 1995 translation(s) (1995 finished and 0 unfinished) Ignored 113 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_zh_TW.qm'... Generated 2108 translation(s) (2108 finished and 0 unfinished) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_ro_RO.qm'... Generated 1015 translation(s) (914 finished and 101 unfinished) Ignored 1093 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_pt.qm'... Generated 2108 translation(s) (2108 finished and 0 unfinished) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_el.qm'... Generated 2108 translation(s) (2108 finished and 0 unfinished) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_fi.qm'... Generated 1375 translation(s) (1325 finished and 50 unfinished) Ignored 733 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_ko.qm'... Generated 2064 translation(s) (2064 finished and 0 unfinished) Ignored 44 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_mk.qm'... Generated 795 translation(s) (657 finished and 138 unfinished) Ignored 1313 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_eu.qm'... Generated 2108 translation(s) (2108 finished and 0 unfinished) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_ca.qm'... Removed plural forms as the target language has less forms. If this sounds wrong, possibly the target language is not set or recognized. Generated 1725 translation(s) (1722 finished and 3 unfinished) Ignored 383 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_sl_SI.qm'... Generated 504 translation(s) (419 finished and 85 unfinished) Ignored 1604 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_ar_SY.qm'... Generated 1999 translation(s) (1992 finished and 7 unfinished) Ignored 109 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_ku.qm'... Generated 896 translation(s) (824 finished and 72 unfinished) Ignored 1212 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_gl.qm'... Generated 2108 translation(s) (2108 finished and 0 unfinished) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_vi_VN.qm'... Generated 1599 translation(s) (1564 finished and 35 unfinished) Ignored 509 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_et.qm'... Generated 1903 translation(s) (1893 finished and 10 unfinished) Ignored 205 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_lt.qm'... Generated 1847 translation(s) (1833 finished and 14 unfinished) Ignored 261 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_da.qm'... Generated 2103 translation(s) (2103 finished and 0 unfinished) Ignored 5 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_hr.qm'... Generated 2103 translation(s) (2103 finished and 0 unfinished) Ignored 5 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_he_IL.qm'... Generated 1642 translation(s) (1630 finished and 12 unfinished) Ignored 466 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_th.qm'... Generated 1607 translation(s) (1585 finished and 22 unfinished) Ignored 501 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_ms_MY.qm'... Generated 2103 translation(s) (2103 finished and 0 unfinished) Ignored 5 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_uz.qm'... Generated 89 translation(s) (47 finished and 42 unfinished) Ignored 2019 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_nn_NO.qm'... Generated 1744 translation(s) (1739 finished and 5 unfinished) Ignored 364 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_id.qm'... Generated 2108 translation(s) (2108 finished and 0 unfinished) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_ar.qm'... Generated 2008 translation(s) (2007 finished and 1 unfinished) Ignored 100 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_en_GB.qm'... Generated 1716 translation(s) (1704 finished and 12 unfinished) Ignored 392 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_sq_AL.qm'... Generated 1100 translation(s) (1076 finished and 24 unfinished) Ignored 1008 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_am.qm'... Generated 2081 translation(s) (2081 finished and 0 unfinished) Ignored 27 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_fa.qm'... Generated 791 translation(s) (750 finished and 41 unfinished) Ignored 1317 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_en_US.qm'... Generated 0 translation(s) (0 finished and 0 unfinished) Ignored 2108 untranslated source text(s) Updating '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/src/translations/smplayer_nb_NO.qm'... Generated 2025 translation(s) (2017 finished and 8 unfinished) Ignored 83 untranslated source text(s) make: Leaving directory '/usr/src/RPM/BUILD/smplayer-19.5.0.9214' + exit 0 Executing(%install): /bin/sh -e /usr/src/tmp/rpm-tmp.85635 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + /bin/chmod -Rf u+rwX -- /usr/src/tmp/kde5-smplayer-buildroot + : + /bin/rm -rf -- /usr/src/tmp/kde5-smplayer-buildroot + cd smplayer-19.5.0.9214 + make DESTDIR=/usr/src/tmp/kde5-smplayer-buildroot install make: Entering directory '/usr/src/RPM/BUILD/smplayer-19.5.0.9214' cd webserver && make make[1]: Entering directory '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/webserver' cc main.c mongoose.c -o simple_web_server -O2 -W -Wall -Werror -Wno-unused-function -DMG_DISABLE_DAV_AUTH -DMG_ENABLE_HTTP_CGI=0 -DMG_ENABLE_THREADS=0 -DMG_ENABLE_HTTP_SSI=0 -pthread In function 'mg_uri_to_local_path', inlined from 'mg_serve_http' at mongoose.c:8068:7: mongoose.c:530:53: error: '%.*s' directive argument is null [-Werror=format-overflow=] 530 | if (cs_log_print_prefix(l, __func__, __FILE__)) cs_log_printf x; \ | ^~~~~~~~~~~~~~~~~~ 531 | } while (0) | ~~~~~~~~~~~ 532 | | 533 | #ifndef CS_NDEBUG | ~~~~~~~~~~~~~~~~~ 534 | | 535 | /* | ~~ 536 | * Shortcut for `LOG(LL_VERBOSE_DEBUG, (...))` | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 537 | */ | ~~ 538 | #define DBG(x) LOG(LL_VERBOSE_DEBUG, x) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 539 | | 540 | #else /* NDEBUG */ | ~~~~~~~~~~~~~~~~~~ 541 | | 542 | #define DBG(x) | ~~~~~~~~~~~~~~ 543 | | 544 | #endif | ~~~~~~ 545 | | 546 | #else /* CS_ENABLE_STDIO */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 547 | | 548 | #define LOG(l, x) | ~~~~~~~~~~~~~~~~~ 549 | #define DBG(x) | ~~~~~~~~~~~~~~ 550 | | 551 | #endif | ~~~~~~ 552 | | 553 | #ifdef __cplusplus | ~~~~~~~~~~~~~~~~~~ 554 | } | ~ 555 | #endif /* __cplusplus */ | ~~~~~~~~~~~~~~~~~~~~~~~~ 556 | | 557 | #endif /* CS_COMMON_CS_DBG_H_ */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 558 | #ifdef MG_MODULE_LINES | ~~~~~~~~~~~~~~~~~~~~~~ 559 | #line 1 "common/cs_dbg.c" | ~~~~~~~~~~~~~~~~~~~~~~~~~ 560 | #endif | ~~~~~~ 561 | /* | ~~ 562 | * Copyright (c) 2014-2016 Cesanta Software Limited | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 563 | * All rights reserved | ~~~~~~~~~~~~~~~~~~~~~ 564 | */ | ~~ 565 | | 566 | /* Amalgamated: #include "common/cs_dbg.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 567 | | 568 | #include | ~~~~~~~~~~~~~~~~~~~ 569 | #include | ~~~~~~~~~~~~~~~~~~ 570 | #include | ~~~~~~~~~~~~~~~~~~~ 571 | | 572 | /* Amalgamated: #include "common/cs_time.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 573 | /* Amalgamated: #include "common/str_util.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 574 | | 575 | enum cs_log_level cs_log_threshold WEAK = | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 576 | #if CS_ENABLE_DEBUG | ~~~~~~~~~~~~~~~~~~~ 577 | LL_VERBOSE_DEBUG; | ~~~~~~~~~~~~~~~~~ 578 | #else | ~~~~~ 579 | LL_ERROR; | ~~~~~~~~~ 580 | #endif | ~~~~~~ 581 | | 582 | static char *s_filter_pattern = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 583 | static size_t s_filter_pattern_len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 584 | | 585 | void cs_log_set_filter(const char *pattern) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 586 | | 587 | #if CS_ENABLE_STDIO | ~~~~~~~~~~~~~~~~~~~ 588 | | 589 | FILE *cs_log_file WEAK = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 590 | | 591 | #if CS_LOG_ENABLE_TS_DIFF | ~~~~~~~~~~~~~~~~~~~~~~~~~ 592 | double cs_log_ts WEAK; | ~~~~~~~~~~~~~~~~~~~~~~ 593 | #endif | ~~~~~~ 594 | | 595 | enum cs_log_level cs_log_cur_msg_level WEAK = LL_NONE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 596 | | 597 | void cs_log_set_filter(const char *pattern) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 598 | free(s_filter_pattern); | ~~~~~~~~~~~~~~~~~~~~~~~ 599 | if (pattern != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~ 600 | s_filter_pattern = strdup(pattern); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 601 | s_filter_pattern_len = strlen(pattern); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 602 | } else { | ~~~~~~~~ 603 | s_filter_pattern = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~ 604 | s_filter_pattern_len = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 605 | } | ~ 606 | } | ~ 607 | | 608 | int cs_log_print_prefix(enum cs_log_level, const char *, const char *) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 609 | int cs_log_print_prefix(enum cs_log_level level, const char *func, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 610 | const char *filename) { | ~~~~~~~~~~~~~~~~~~~~~~~ 611 | char prefix[21]; | ~~~~~~~~~~~~~~~~ 612 | | 613 | if (level > cs_log_threshold) return 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 614 | if (s_filter_pattern != NULL && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 615 | mg_match_prefix(s_filter_pattern, s_filter_pattern_len, func) == 0 && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 616 | mg_match_prefix(s_filter_pattern, s_filter_pattern_len, filename) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 617 | return 0; | ~~~~~~~~~ 618 | } | ~ 619 | | 620 | strncpy(prefix, func, 20); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 621 | prefix[20] = '\0'; | ~~~~~~~~~~~~~~~~~~ 622 | if (cs_log_file == NULL) cs_log_file = stderr; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 623 | cs_log_cur_msg_level = level; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 624 | fprintf(cs_log_file, "%-20s ", prefix); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 625 | #if CS_LOG_ENABLE_TS_DIFF | ~~~~~~~~~~~~~~~~~~~~~~~~~ 626 | { | ~ 627 | double now = cs_time(); | ~~~~~~~~~~~~~~~~~~~~~~~ 628 | fprintf(cs_log_file, "%7u ", (unsigned int) ((now - cs_log_ts) * 1000000)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 629 | cs_log_ts = now; | ~~~~~~~~~~~~~~~~ 630 | } | ~ 631 | #endif | ~~~~~~ 632 | return 1; | ~~~~~~~~~ 633 | } | ~ 634 | | 635 | void cs_log_printf(const char *fmt, ...) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 636 | void cs_log_printf(const char *fmt, ...) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 637 | va_list ap; | ~~~~~~~~~~~ 638 | va_start(ap, fmt); | ~~~~~~~~~~~~~~~~~~ 639 | vfprintf(cs_log_file, fmt, ap); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 640 | va_end(ap); | ~~~~~~~~~~~ 641 | fputc('\n', cs_log_file); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 642 | fflush(cs_log_file); | ~~~~~~~~~~~~~~~~~~~~ 643 | cs_log_cur_msg_level = LL_NONE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 644 | } | ~ 645 | | 646 | void cs_log_set_file(FILE *file) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 647 | void cs_log_set_file(FILE *file) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 648 | cs_log_file = file; | ~~~~~~~~~~~~~~~~~~~ 649 | } | ~ 650 | | 651 | #else | ~~~~~ 652 | | 653 | void cs_log_set_filter(const char *pattern) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 654 | (void) pattern; | ~~~~~~~~~~~~~~~ 655 | } | ~ 656 | | 657 | #endif /* CS_ENABLE_STDIO */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 658 | | 659 | void cs_log_set_level(enum cs_log_level level) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 660 | void cs_log_set_level(enum cs_log_level level) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 661 | cs_log_threshold = level; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 662 | #if CS_LOG_ENABLE_TS_DIFF && CS_ENABLE_STDIO | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 663 | cs_log_ts = cs_time(); | ~~~~~~~~~~~~~~~~~~~~~~ 664 | #endif | ~~~~~~ 665 | } | ~ 666 | #ifdef MG_MODULE_LINES | ~~~~~~~~~~~~~~~~~~~~~~ 667 | #line 1 "common/cs_dirent.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 668 | #endif | ~~~~~~ 669 | /* | ~~ 670 | * Copyright (c) 2014-2016 Cesanta Software Limited | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 671 | * All rights reserved | ~~~~~~~~~~~~~~~~~~~~~ 672 | */ | ~~ 673 | | 674 | #ifndef CS_COMMON_CS_DIRENT_H_ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 675 | #define CS_COMMON_CS_DIRENT_H_ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 676 | | 677 | #include | ~~~~~~~~~~~~~~~~~~~ 678 | | 679 | /* Amalgamated: #include "common/platform.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 680 | | 681 | #ifdef __cplusplus | ~~~~~~~~~~~~~~~~~~ 682 | extern "C" { | ~~~~~~~~~~~~ 683 | #endif /* __cplusplus */ | ~~~~~~~~~~~~~~~~~~~~~~~~ 684 | | 685 | #ifdef CS_DEFINE_DIRENT | ~~~~~~~~~~~~~~~~~~~~~~~ 686 | typedef struct { int dummy; } DIR; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 687 | | 688 | struct dirent { | ~~~~~~~~~~~~~~~ 689 | int d_ino; | ~~~~~~~~~~ 690 | #ifdef _WIN32 | ~~~~~~~~~~~~~ 691 | char d_name[MAX_PATH]; | ~~~~~~~~~~~~~~~~~~~~~~ 692 | #else | ~~~~~ 693 | /* TODO(rojer): Use PATH_MAX but make sure it's sane on every platform */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 694 | char d_name[256]; | ~~~~~~~~~~~~~~~~~ 695 | #endif | ~~~~~~ 696 | }; | ~~ 697 | | 698 | DIR *opendir(const char *dir_name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 699 | int closedir(DIR *dir); | ~~~~~~~~~~~~~~~~~~~~~~~ 700 | struct dirent *readdir(DIR *dir); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 701 | #endif /* CS_DEFINE_DIRENT */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 702 | | 703 | #ifdef __cplusplus | ~~~~~~~~~~~~~~~~~~ 704 | } | ~ 705 | #endif /* __cplusplus */ | ~~~~~~~~~~~~~~~~~~~~~~~~ 706 | | 707 | #endif /* CS_COMMON_CS_DIRENT_H_ */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 708 | #ifdef MG_MODULE_LINES | ~~~~~~~~~~~~~~~~~~~~~~ 709 | #line 1 "common/cs_dirent.c" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 710 | #endif | ~~~~~~ 711 | /* | ~~ 712 | * Copyright (c) 2015 Cesanta Software Limited | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 713 | * All rights reserved | ~~~~~~~~~~~~~~~~~~~~~ 714 | */ | ~~ 715 | | 716 | #ifndef EXCLUDE_COMMON | ~~~~~~~~~~~~~~~~~~~~~~ 717 | | 718 | /* Amalgamated: #include "common/mg_mem.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 719 | /* Amalgamated: #include "common/cs_dirent.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 720 | | 721 | /* | ~~ 722 | * This file contains POSIX opendir/closedir/readdir API implementation | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 723 | * for systems which do not natively support it (e.g. Windows). | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 724 | */ | ~~ 725 | | 726 | #ifdef _WIN32 | ~~~~~~~~~~~~~ 727 | struct win32_dir { | ~~~~~~~~~~~~~~~~~~ 728 | DIR d; | ~~~~~~ 729 | HANDLE handle; | ~~~~~~~~~~~~~~ 730 | WIN32_FIND_DATAW info; | ~~~~~~~~~~~~~~~~~~~~~~ 731 | struct dirent result; | ~~~~~~~~~~~~~~~~~~~~~ 732 | }; | ~~ 733 | | 734 | DIR *opendir(const char *name) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 735 | struct win32_dir *dir = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 736 | wchar_t wpath[MAX_PATH]; | ~~~~~~~~~~~~~~~~~~~~~~~~ 737 | DWORD attrs; | ~~~~~~~~~~~~ 738 | | 739 | if (name == NULL) { | ~~~~~~~~~~~~~~~~~~~ 740 | SetLastError(ERROR_BAD_ARGUMENTS); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 741 | } else if ((dir = (struct win32_dir *) MG_MALLOC(sizeof(*dir))) == NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 742 | SetLastError(ERROR_NOT_ENOUGH_MEMORY); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 743 | } else { | ~~~~~~~~ 744 | to_wchar(name, wpath, ARRAY_SIZE(wpath)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 745 | attrs = GetFileAttributesW(wpath); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 746 | if (attrs != 0xFFFFFFFF && (attrs & FILE_ATTRIBUTE_DIRECTORY)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 747 | (void) wcscat(wpath, L"\\*"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 748 | dir->handle = FindFirstFileW(wpath, &dir->info); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 749 | dir->result.d_name[0] = '\0'; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 750 | } else { | ~~~~~~~~ 751 | MG_FREE(dir); | ~~~~~~~~~~~~~ 752 | dir = NULL; | ~~~~~~~~~~~ 753 | } | ~ 754 | } | ~ 755 | | 756 | return (DIR *) dir; | ~~~~~~~~~~~~~~~~~~~ 757 | } | ~ 758 | | 759 | int closedir(DIR *d) { | ~~~~~~~~~~~~~~~~~~~~~~ 760 | struct win32_dir *dir = (struct win32_dir *) d; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 761 | int result = 0; | ~~~~~~~~~~~~~~~ 762 | | 763 | if (dir != NULL) { | ~~~~~~~~~~~~~~~~~~ 764 | if (dir->handle != INVALID_HANDLE_VALUE) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 765 | result = FindClose(dir->handle) ? 0 : -1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 766 | MG_FREE(dir); | ~~~~~~~~~~~~~ 767 | } else { | ~~~~~~~~ 768 | result = -1; | ~~~~~~~~~~~~ 769 | SetLastError(ERROR_BAD_ARGUMENTS); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 770 | } | ~ 771 | | 772 | return result; | ~~~~~~~~~~~~~~ 773 | } | ~ 774 | | 775 | struct dirent *readdir(DIR *d) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 776 | struct win32_dir *dir = (struct win32_dir *) d; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 777 | struct dirent *result = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 778 | | 779 | if (dir) { | ~~~~~~~~~~ 780 | memset(&dir->result, 0, sizeof(dir->result)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 781 | if (dir->handle != INVALID_HANDLE_VALUE) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 782 | result = &dir->result; | ~~~~~~~~~~~~~~~~~~~~~~ 783 | (void) WideCharToMultiByte(CP_UTF8, 0, dir->info.cFileName, -1, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 784 | result->d_name, sizeof(result->d_name), NULL, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 785 | NULL); | ~~~~~~ 786 | | 787 | if (!FindNextFileW(dir->handle, &dir->info)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 788 | (void) FindClose(dir->handle); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 789 | dir->handle = INVALID_HANDLE_VALUE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 790 | } | ~ 791 | | 792 | } else { | ~~~~~~~~ 793 | SetLastError(ERROR_FILE_NOT_FOUND); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 794 | } | ~ 795 | } else { | ~~~~~~~~ 796 | SetLastError(ERROR_BAD_ARGUMENTS); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 797 | } | ~ 798 | | 799 | return result; | ~~~~~~~~~~~~~~ 800 | } | ~ 801 | #endif | ~~~~~~ 802 | | 803 | #endif /* EXCLUDE_COMMON */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 804 | | 805 | /* ISO C requires a translation unit to contain at least one declaration */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 806 | typedef int cs_dirent_dummy; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 807 | #ifdef MG_MODULE_LINES | ~~~~~~~~~~~~~~~~~~~~~~ 808 | #line 1 "common/cs_time.c" | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 809 | #endif | ~~~~~~ 810 | /* | ~~ 811 | * Copyright (c) 2014-2016 Cesanta Software Limited | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 812 | * All rights reserved | ~~~~~~~~~~~~~~~~~~~~~ 813 | */ | ~~ 814 | | 815 | /* Amalgamated: #include "common/cs_time.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 816 | | 817 | #ifndef _WIN32 | ~~~~~~~~~~~~~~ 818 | #include | ~~~~~~~~~~~~~~~~~~~ 819 | /* | ~~ 820 | * There is no sys/time.h on ARMCC. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 821 | */ | ~~ 822 | #if !(defined(__ARMCC_VERSION) || defined(__ICCARM__)) && \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 823 | !defined(__TI_COMPILER_VERSION__) && \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 824 | (!defined(CS_PLATFORM) || CS_PLATFORM != CS_P_NXP_LPC) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 825 | #include | ~~~~~~~~~~~~~~~~~~~~~ 826 | #endif | ~~~~~~ 827 | #else | ~~~~~ 828 | #include | ~~~~~~~~~~~~~~~~~~~~ 829 | #endif | ~~~~~~ 830 | | 831 | double cs_time(void) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 832 | double cs_time(void) { | ~~~~~~~~~~~~~~~~~~~~~~ 833 | double now; | ~~~~~~~~~~~ 834 | #ifndef _WIN32 | ~~~~~~~~~~~~~~ 835 | struct timeval tv; | ~~~~~~~~~~~~~~~~~~ 836 | if (gettimeofday(&tv, NULL /* tz */) != 0) return 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 837 | now = (double) tv.tv_sec + (((double) tv.tv_usec) / 1000000.0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 838 | #else | ~~~~~ 839 | SYSTEMTIME sysnow; | ~~~~~~~~~~~~~~~~~~ 840 | FILETIME ftime; | ~~~~~~~~~~~~~~~ 841 | GetLocalTime(&sysnow); | ~~~~~~~~~~~~~~~~~~~~~~ 842 | SystemTimeToFileTime(&sysnow, &ftime); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 843 | /* | ~~ 844 | * 1. VC 6.0 doesn't support conversion uint64 -> double, so, using int64 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 845 | * This should not cause a problems in this (21th) century | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 846 | * 2. Windows FILETIME is a number of 100-nanosecond intervals since January | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 847 | * 1, 1601 while time_t is a number of _seconds_ since January 1, 1970 UTC, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 848 | * thus, we need to convert to seconds and adjust amount (subtract 11644473600 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 849 | * seconds) | ~~~~~~~~~~ 850 | */ | ~~ 851 | now = (double) (((int64_t) ftime.dwLowDateTime + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 852 | ((int64_t) ftime.dwHighDateTime << 32)) / | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 853 | 10000000.0) - | ~~~~~~~~~~~~~ 854 | 11644473600; | ~~~~~~~~~~~~ 855 | #endif /* _WIN32 */ | ~~~~~~~~~~~~~~~~~~~ 856 | return now; | ~~~~~~~~~~~ 857 | } | ~ 858 | | 859 | double cs_timegm(const struct tm *tm) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 860 | /* Month-to-day offset for non-leap-years. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 861 | static const int month_day[12] = {0, 31, 59, 90, 120, 151, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 862 | 181, 212, 243, 273, 304, 334}; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 863 | | 864 | /* Most of the calculation is easy; leap years are the main difficulty. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 865 | int month = tm->tm_mon % 12; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 866 | int year = tm->tm_year + tm->tm_mon / 12; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 867 | int year_for_leap; | ~~~~~~~~~~~~~~~~~~ 868 | int64_t rt; | ~~~~~~~~~~~ 869 | | 870 | if (month < 0) { /* Negative values % 12 are still negative. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 871 | month += 12; | ~~~~~~~~~~~~ 872 | --year; | ~~~~~~~ 873 | } | ~ 874 | | 875 | /* This is the number of Februaries since 1900. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 876 | year_for_leap = (month > 1) ? year + 1 : year; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 877 | | 878 | rt = | ~~~~ 879 | tm->tm_sec /* Seconds */ | ~~~~~~~~~~~~~~~~~~~~~~~~ 880 | + | ~ 881 | 60 * | ~~~~ 882 | (tm->tm_min /* Minute = 60 seconds */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 883 | + | ~ 884 | 60 * (tm->tm_hour /* Hour = 60 minutes */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 885 | + | ~ 886 | 24 * (month_day[month] + tm->tm_mday - 1 /* Day = 24 hours */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 887 | + 365 * (year - 70) /* Year = 365 days */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 888 | + (year_for_leap - 69) / 4 /* Every 4 years is leap... */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 889 | - (year_for_leap - 1) / 100 /* Except centuries... */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 890 | + (year_for_leap + 299) / 400))); /* Except 400s. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 891 | return rt < 0 ? -1 : (double) rt; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 892 | } | ~ 893 | #ifdef MG_MODULE_LINES | ~~~~~~~~~~~~~~~~~~~~~~ 894 | #line 1 "common/cs_endian.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 895 | #endif | ~~~~~~ 896 | /* | ~~ 897 | * Copyright (c) 2014-2016 Cesanta Software Limited | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 898 | * All rights reserved | ~~~~~~~~~~~~~~~~~~~~~ 899 | */ | ~~ 900 | | 901 | #ifndef CS_COMMON_CS_ENDIAN_H_ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 902 | #define CS_COMMON_CS_ENDIAN_H_ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 903 | | 904 | #ifdef __cplusplus | ~~~~~~~~~~~~~~~~~~ 905 | extern "C" { | ~~~~~~~~~~~~ 906 | #endif | ~~~~~~ 907 | | 908 | /* | ~~ 909 | * clang with std=-c99 uses __LITTLE_ENDIAN, by default | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 910 | * while for ex, RTOS gcc - LITTLE_ENDIAN, by default | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 911 | * it depends on __USE_BSD, but let's have everything | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 912 | */ | ~~ 913 | #if !defined(BYTE_ORDER) && defined(__BYTE_ORDER) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 914 | #define BYTE_ORDER __BYTE_ORDER | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 915 | #ifndef LITTLE_ENDIAN | ~~~~~~~~~~~~~~~~~~~~~ 916 | #define LITTLE_ENDIAN __LITTLE_ENDIAN | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 917 | #endif /* LITTLE_ENDIAN */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 918 | #ifndef BIG_ENDIAN | ~~~~~~~~~~~~~~~~~~ 919 | #define BIG_ENDIAN __LITTLE_ENDIAN | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 920 | #endif /* BIG_ENDIAN */ | ~~~~~~~~~~~~~~~~~~~~~~~ 921 | #endif /* BYTE_ORDER */ | ~~~~~~~~~~~~~~~~~~~~~~~ 922 | | 923 | #ifdef __cplusplus | ~~~~~~~~~~~~~~~~~~ 924 | } | ~ 925 | #endif | ~~~~~~ 926 | | 927 | #endif /* CS_COMMON_CS_ENDIAN_H_ */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 928 | #ifdef MG_MODULE_LINES | ~~~~~~~~~~~~~~~~~~~~~~ 929 | #line 1 "common/cs_md5.c" | ~~~~~~~~~~~~~~~~~~~~~~~~~ 930 | #endif | ~~~~~~ 931 | /* | ~~ 932 | * This code implements the MD5 message-digest algorithm. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 933 | * The algorithm is due to Ron Rivest. This code was | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 934 | * written by Colin Plumb in 1993, no copyright is claimed. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 935 | * This code is in the public domain; do with it what you wish. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 936 | * | ~ 937 | * Equivalent code is available from RSA Data Security, Inc. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 938 | * This code has been tested against that, and is equivalent, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 939 | * except that you don't need to include two pages of legalese | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 940 | * with every copy. | ~~~~~~~~~~~~~~~~~~ 941 | * | ~ 942 | * To compute the message digest of a chunk of bytes, declare an | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 943 | * MD5Context structure, pass it to MD5Init, call MD5Update as | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 944 | * needed on buffers full of bytes, and then call MD5Final, which | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 945 | * will fill a supplied 16-byte array with the digest. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 946 | */ | ~~ 947 | | 948 | /* Amalgamated: #include "common/cs_md5.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 949 | /* Amalgamated: #include "common/str_util.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 950 | | 951 | #if !defined(EXCLUDE_COMMON) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 952 | #if !CS_DISABLE_MD5 | ~~~~~~~~~~~~~~~~~~~ 953 | | 954 | /* Amalgamated: #include "common/cs_endian.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 955 | | 956 | static void byteReverse(unsigned char *buf, unsigned longs) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 957 | /* Forrest: MD5 expect LITTLE_ENDIAN, swap if BIG_ENDIAN */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 958 | #if BYTE_ORDER == BIG_ENDIAN | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 959 | do { | ~~~~ 960 | uint32_t t = (uint32_t)((unsigned) buf[3] << 8 | buf[2]) << 16 | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 961 | ((unsigned) buf[1] << 8 | buf[0]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 962 | *(uint32_t *) buf = t; | ~~~~~~~~~~~~~~~~~~~~~~ 963 | buf += 4; | ~~~~~~~~~ 964 | } while (--longs); | ~~~~~~~~~~~~~~~~~~ 965 | #else | ~~~~~ 966 | (void) buf; | ~~~~~~~~~~~ 967 | (void) longs; | ~~~~~~~~~~~~~ 968 | #endif | ~~~~~~ 969 | } | ~ 970 | | 971 | #define F1(x, y, z) (z ^ (x & (y ^ z))) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 972 | #define F2(x, y, z) F1(z, x, y) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 973 | #define F3(x, y, z) (x ^ y ^ z) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 974 | #define F4(x, y, z) (y ^ (x | ~z)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 975 | | 976 | #define MD5STEP(f, w, x, y, z, data, s) \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 977 | (w += f(x, y, z) + data, w = w << s | w >> (32 - s), w += x) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 978 | | 979 | /* | ~~ 980 | * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 981 | * initialization constants. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 982 | */ | ~~ 983 | void cs_md5_init(cs_md5_ctx *ctx) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 984 | ctx->buf[0] = 0x67452301; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 985 | ctx->buf[1] = 0xefcdab89; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 986 | ctx->buf[2] = 0x98badcfe; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 987 | ctx->buf[3] = 0x10325476; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 988 | | 989 | ctx->bits[0] = 0; | ~~~~~~~~~~~~~~~~~ 990 | ctx->bits[1] = 0; | ~~~~~~~~~~~~~~~~~ 991 | } | ~ 992 | | 993 | static void cs_md5_transform(uint32_t buf[4], uint32_t const in[16]) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 994 | register uint32_t a, b, c, d; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 995 | | 996 | a = buf[0]; | ~~~~~~~~~~~ 997 | b = buf[1]; | ~~~~~~~~~~~ 998 | c = buf[2]; | ~~~~~~~~~~~ 999 | d = buf[3]; | ~~~~~~~~~~~ 1000 | | 1001 | MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1002 | MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1003 | MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1004 | MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1005 | MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1006 | MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1007 | MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1008 | MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1009 | MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1010 | MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1011 | MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1012 | MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1013 | MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1014 | MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1015 | MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1016 | MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1017 | | 1018 | MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1019 | MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1020 | MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1021 | MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1022 | MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1023 | MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1024 | MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1025 | MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1026 | MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1027 | MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1028 | MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1029 | MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1030 | MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1031 | MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1032 | MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1033 | MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1034 | | 1035 | MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1036 | MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1037 | MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1038 | MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1039 | MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1040 | MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1041 | MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1042 | MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1043 | MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1044 | MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1045 | MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1046 | MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1047 | MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1048 | MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1049 | MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1050 | MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1051 | | 1052 | MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1053 | MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1054 | MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1055 | MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1056 | MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1057 | MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1058 | MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1059 | MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1060 | MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1061 | MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1062 | MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1063 | MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1064 | MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1065 | MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1066 | MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1067 | MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1068 | | 1069 | buf[0] += a; | ~~~~~~~~~~~~ 1070 | buf[1] += b; | ~~~~~~~~~~~~ 1071 | buf[2] += c; | ~~~~~~~~~~~~ 1072 | buf[3] += d; | ~~~~~~~~~~~~ 1073 | } | ~ 1074 | | 1075 | void cs_md5_update(cs_md5_ctx *ctx, const unsigned char *buf, size_t len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1076 | uint32_t t; | ~~~~~~~~~~~ 1077 | | 1078 | t = ctx->bits[0]; | ~~~~~~~~~~~~~~~~~ 1079 | if ((ctx->bits[0] = t + ((uint32_t) len << 3)) < t) ctx->bits[1]++; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1080 | ctx->bits[1] += (uint32_t) len >> 29; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1081 | | 1082 | t = (t >> 3) & 0x3f; | ~~~~~~~~~~~~~~~~~~~~ 1083 | | 1084 | if (t) { | ~~~~~~~~ 1085 | unsigned char *p = (unsigned char *) ctx->in + t; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1086 | | 1087 | t = 64 - t; | ~~~~~~~~~~~ 1088 | if (len < t) { | ~~~~~~~~~~~~~~ 1089 | memcpy(p, buf, len); | ~~~~~~~~~~~~~~~~~~~~ 1090 | return; | ~~~~~~~ 1091 | } | ~ 1092 | memcpy(p, buf, t); | ~~~~~~~~~~~~~~~~~~ 1093 | byteReverse(ctx->in, 16); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 1094 | cs_md5_transform(ctx->buf, (uint32_t *) ctx->in); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 | buf += t; | ~~~~~~~~~ 1096 | len -= t; | ~~~~~~~~~ 1097 | } | ~ 1098 | | 1099 | while (len >= 64) { | ~~~~~~~~~~~~~~~~~~~ 1100 | memcpy(ctx->in, buf, 64); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 1101 | byteReverse(ctx->in, 16); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 1102 | cs_md5_transform(ctx->buf, (uint32_t *) ctx->in); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1103 | buf += 64; | ~~~~~~~~~~ 1104 | len -= 64; | ~~~~~~~~~~ 1105 | } | ~ 1106 | | 1107 | memcpy(ctx->in, buf, len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1108 | } | ~ 1109 | | 1110 | void cs_md5_final(unsigned char digest[16], cs_md5_ctx *ctx) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1111 | unsigned count; | ~~~~~~~~~~~~~~~ 1112 | unsigned char *p; | ~~~~~~~~~~~~~~~~~ 1113 | uint32_t *a; | ~~~~~~~~~~~~ 1114 | | 1115 | count = (ctx->bits[0] >> 3) & 0x3F; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1116 | | 1117 | p = ctx->in + count; | ~~~~~~~~~~~~~~~~~~~~ 1118 | *p++ = 0x80; | ~~~~~~~~~~~~ 1119 | count = 64 - 1 - count; | ~~~~~~~~~~~~~~~~~~~~~~~ 1120 | if (count < 8) { | ~~~~~~~~~~~~~~~~ 1121 | memset(p, 0, count); | ~~~~~~~~~~~~~~~~~~~~ 1122 | byteReverse(ctx->in, 16); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 1123 | cs_md5_transform(ctx->buf, (uint32_t *) ctx->in); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1124 | memset(ctx->in, 0, 56); | ~~~~~~~~~~~~~~~~~~~~~~~ 1125 | } else { | ~~~~~~~~ 1126 | memset(p, 0, count - 8); | ~~~~~~~~~~~~~~~~~~~~~~~~ 1127 | } | ~ 1128 | byteReverse(ctx->in, 14); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 1129 | | 1130 | a = (uint32_t *) ctx->in; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 1131 | a[14] = ctx->bits[0]; | ~~~~~~~~~~~~~~~~~~~~~ 1132 | a[15] = ctx->bits[1]; | ~~~~~~~~~~~~~~~~~~~~~ 1133 | | 1134 | cs_md5_transform(ctx->buf, (uint32_t *) ctx->in); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1135 | byteReverse((unsigned char *) ctx->buf, 4); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1136 | memcpy(digest, ctx->buf, 16); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1137 | memset((char *) ctx, 0, sizeof(*ctx)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1138 | } | ~ 1139 | | 1140 | #endif /* CS_DISABLE_MD5 */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1141 | #endif /* EXCLUDE_COMMON */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1142 | #ifdef MG_MODULE_LINES | ~~~~~~~~~~~~~~~~~~~~~~ 1143 | #line 1 "common/cs_sha1.c" | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1144 | #endif | ~~~~~~ 1145 | /* Copyright(c) By Steve Reid */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1146 | /* 100% Public Domain */ | ~~~~~~~~~~~~~~~~~~~~~~~~ 1147 | | 1148 | /* Amalgamated: #include "common/cs_sha1.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1149 | | 1150 | #if !CS_DISABLE_SHA1 && !defined(EXCLUDE_COMMON) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1151 | | 1152 | /* Amalgamated: #include "common/cs_endian.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1153 | | 1154 | #define SHA1HANDSOFF | ~~~~~~~~~~~~~~~~~~~~ 1155 | #if defined(__sun) | ~~~~~~~~~~~~~~~~~~ 1156 | /* Amalgamated: #include "common/solarisfixes.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1157 | #endif | ~~~~~~ 1158 | | 1159 | union char64long16 { | ~~~~~~~~~~~~~~~~~~~~ 1160 | unsigned char c[64]; | ~~~~~~~~~~~~~~~~~~~~ 1161 | uint32_t l[16]; | ~~~~~~~~~~~~~~~ 1162 | }; | ~~ 1163 | | 1164 | #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1165 | | 1166 | static uint32_t blk0(union char64long16 *block, int i) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 | /* Forrest: SHA expect BIG_ENDIAN, swap if LITTLE_ENDIAN */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 | #if BYTE_ORDER == LITTLE_ENDIAN | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1169 | block->l[i] = | ~~~~~~~~~~~~~ 1170 | (rol(block->l[i], 24) & 0xFF00FF00) | (rol(block->l[i], 8) & 0x00FF00FF); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1171 | #endif | ~~~~~~ 1172 | return block->l[i]; | ~~~~~~~~~~~~~~~~~~~ 1173 | } | ~ 1174 | | 1175 | /* Avoid redefine warning (ARM /usr/include/sys/ucontext.h define R0~R4) */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1176 | #undef blk | ~~~~~~~~~~ 1177 | #undef R0 | ~~~~~~~~~ 1178 | #undef R1 | ~~~~~~~~~ 1179 | #undef R2 | ~~~~~~~~~ 1180 | #undef R3 | ~~~~~~~~~ 1181 | #undef R4 | ~~~~~~~~~ 1182 | | 1183 | #define blk(i) \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1184 | (block->l[i & 15] = rol(block->l[(i + 13) & 15] ^ block->l[(i + 8) & 15] ^ \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1185 | block->l[(i + 2) & 15] ^ block->l[i & 15], \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1186 | 1)) | ~~~ 1187 | #define R0(v, w, x, y, z, i) \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1188 | z += ((w & (x ^ y)) ^ y) + blk0(block, i) + 0x5A827999 + rol(v, 5); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1189 | w = rol(w, 30); | ~~~~~~~~~~~~~~~ 1190 | #define R1(v, w, x, y, z, i) \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1191 | z += ((w & (x ^ y)) ^ y) + blk(i) + 0x5A827999 + rol(v, 5); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1192 | w = rol(w, 30); | ~~~~~~~~~~~~~~~ 1193 | #define R2(v, w, x, y, z, i) \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1194 | z += (w ^ x ^ y) + blk(i) + 0x6ED9EBA1 + rol(v, 5); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1195 | w = rol(w, 30); | ~~~~~~~~~~~~~~~ 1196 | #define R3(v, w, x, y, z, i) \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1197 | z += (((w | x) & y) | (w & x)) + blk(i) + 0x8F1BBCDC + rol(v, 5); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1198 | w = rol(w, 30); | ~~~~~~~~~~~~~~~ 1199 | #define R4(v, w, x, y, z, i) \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1200 | z += (w ^ x ^ y) + blk(i) + 0xCA62C1D6 + rol(v, 5); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1201 | w = rol(w, 30); | ~~~~~~~~~~~~~~~ 1202 | | 1203 | void cs_sha1_transform(uint32_t state[5], const unsigned char buffer[64]) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1204 | uint32_t a, b, c, d, e; | ~~~~~~~~~~~~~~~~~~~~~~~ 1205 | union char64long16 block[1]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1206 | | 1207 | memcpy(block, buffer, 64); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1208 | a = state[0]; | ~~~~~~~~~~~~~ 1209 | b = state[1]; | ~~~~~~~~~~~~~ 1210 | c = state[2]; | ~~~~~~~~~~~~~ 1211 | d = state[3]; | ~~~~~~~~~~~~~ 1212 | e = state[4]; | ~~~~~~~~~~~~~ 1213 | R0(a, b, c, d, e, 0); | ~~~~~~~~~~~~~~~~~~~~~ 1214 | R0(e, a, b, c, d, 1); | ~~~~~~~~~~~~~~~~~~~~~ 1215 | R0(d, e, a, b, c, 2); | ~~~~~~~~~~~~~~~~~~~~~ 1216 | R0(c, d, e, a, b, 3); | ~~~~~~~~~~~~~~~~~~~~~ 1217 | R0(b, c, d, e, a, 4); | ~~~~~~~~~~~~~~~~~~~~~ 1218 | R0(a, b, c, d, e, 5); | ~~~~~~~~~~~~~~~~~~~~~ 1219 | R0(e, a, b, c, d, 6); | ~~~~~~~~~~~~~~~~~~~~~ 1220 | R0(d, e, a, b, c, 7); | ~~~~~~~~~~~~~~~~~~~~~ 1221 | R0(c, d, e, a, b, 8); | ~~~~~~~~~~~~~~~~~~~~~ 1222 | R0(b, c, d, e, a, 9); | ~~~~~~~~~~~~~~~~~~~~~ 1223 | R0(a, b, c, d, e, 10); | ~~~~~~~~~~~~~~~~~~~~~~ 1224 | R0(e, a, b, c, d, 11); | ~~~~~~~~~~~~~~~~~~~~~~ 1225 | R0(d, e, a, b, c, 12); | ~~~~~~~~~~~~~~~~~~~~~~ 1226 | R0(c, d, e, a, b, 13); | ~~~~~~~~~~~~~~~~~~~~~~ 1227 | R0(b, c, d, e, a, 14); | ~~~~~~~~~~~~~~~~~~~~~~ 1228 | R0(a, b, c, d, e, 15); | ~~~~~~~~~~~~~~~~~~~~~~ 1229 | R1(e, a, b, c, d, 16); | ~~~~~~~~~~~~~~~~~~~~~~ 1230 | R1(d, e, a, b, c, 17); | ~~~~~~~~~~~~~~~~~~~~~~ 1231 | R1(c, d, e, a, b, 18); | ~~~~~~~~~~~~~~~~~~~~~~ 1232 | R1(b, c, d, e, a, 19); | ~~~~~~~~~~~~~~~~~~~~~~ 1233 | R2(a, b, c, d, e, 20); | ~~~~~~~~~~~~~~~~~~~~~~ 1234 | R2(e, a, b, c, d, 21); | ~~~~~~~~~~~~~~~~~~~~~~ 1235 | R2(d, e, a, b, c, 22); | ~~~~~~~~~~~~~~~~~~~~~~ 1236 | R2(c, d, e, a, b, 23); | ~~~~~~~~~~~~~~~~~~~~~~ 1237 | R2(b, c, d, e, a, 24); | ~~~~~~~~~~~~~~~~~~~~~~ 1238 | R2(a, b, c, d, e, 25); | ~~~~~~~~~~~~~~~~~~~~~~ 1239 | R2(e, a, b, c, d, 26); | ~~~~~~~~~~~~~~~~~~~~~~ 1240 | R2(d, e, a, b, c, 27); | ~~~~~~~~~~~~~~~~~~~~~~ 1241 | R2(c, d, e, a, b, 28); | ~~~~~~~~~~~~~~~~~~~~~~ 1242 | R2(b, c, d, e, a, 29); | ~~~~~~~~~~~~~~~~~~~~~~ 1243 | R2(a, b, c, d, e, 30); | ~~~~~~~~~~~~~~~~~~~~~~ 1244 | R2(e, a, b, c, d, 31); | ~~~~~~~~~~~~~~~~~~~~~~ 1245 | R2(d, e, a, b, c, 32); | ~~~~~~~~~~~~~~~~~~~~~~ 1246 | R2(c, d, e, a, b, 33); | ~~~~~~~~~~~~~~~~~~~~~~ 1247 | R2(b, c, d, e, a, 34); | ~~~~~~~~~~~~~~~~~~~~~~ 1248 | R2(a, b, c, d, e, 35); | ~~~~~~~~~~~~~~~~~~~~~~ 1249 | R2(e, a, b, c, d, 36); | ~~~~~~~~~~~~~~~~~~~~~~ 1250 | R2(d, e, a, b, c, 37); | ~~~~~~~~~~~~~~~~~~~~~~ 1251 | R2(c, d, e, a, b, 38); | ~~~~~~~~~~~~~~~~~~~~~~ 1252 | R2(b, c, d, e, a, 39); | ~~~~~~~~~~~~~~~~~~~~~~ 1253 | R3(a, b, c, d, e, 40); | ~~~~~~~~~~~~~~~~~~~~~~ 1254 | R3(e, a, b, c, d, 41); | ~~~~~~~~~~~~~~~~~~~~~~ 1255 | R3(d, e, a, b, c, 42); | ~~~~~~~~~~~~~~~~~~~~~~ 1256 | R3(c, d, e, a, b, 43); | ~~~~~~~~~~~~~~~~~~~~~~ 1257 | R3(b, c, d, e, a, 44); | ~~~~~~~~~~~~~~~~~~~~~~ 1258 | R3(a, b, c, d, e, 45); | ~~~~~~~~~~~~~~~~~~~~~~ 1259 | R3(e, a, b, c, d, 46); | ~~~~~~~~~~~~~~~~~~~~~~ 1260 | R3(d, e, a, b, c, 47); | ~~~~~~~~~~~~~~~~~~~~~~ 1261 | R3(c, d, e, a, b, 48); | ~~~~~~~~~~~~~~~~~~~~~~ 1262 | R3(b, c, d, e, a, 49); | ~~~~~~~~~~~~~~~~~~~~~~ 1263 | R3(a, b, c, d, e, 50); | ~~~~~~~~~~~~~~~~~~~~~~ 1264 | R3(e, a, b, c, d, 51); | ~~~~~~~~~~~~~~~~~~~~~~ 1265 | R3(d, e, a, b, c, 52); | ~~~~~~~~~~~~~~~~~~~~~~ 1266 | R3(c, d, e, a, b, 53); | ~~~~~~~~~~~~~~~~~~~~~~ 1267 | R3(b, c, d, e, a, 54); | ~~~~~~~~~~~~~~~~~~~~~~ 1268 | R3(a, b, c, d, e, 55); | ~~~~~~~~~~~~~~~~~~~~~~ 1269 | R3(e, a, b, c, d, 56); | ~~~~~~~~~~~~~~~~~~~~~~ 1270 | R3(d, e, a, b, c, 57); | ~~~~~~~~~~~~~~~~~~~~~~ 1271 | R3(c, d, e, a, b, 58); | ~~~~~~~~~~~~~~~~~~~~~~ 1272 | R3(b, c, d, e, a, 59); | ~~~~~~~~~~~~~~~~~~~~~~ 1273 | R4(a, b, c, d, e, 60); | ~~~~~~~~~~~~~~~~~~~~~~ 1274 | R4(e, a, b, c, d, 61); | ~~~~~~~~~~~~~~~~~~~~~~ 1275 | R4(d, e, a, b, c, 62); | ~~~~~~~~~~~~~~~~~~~~~~ 1276 | R4(c, d, e, a, b, 63); | ~~~~~~~~~~~~~~~~~~~~~~ 1277 | R4(b, c, d, e, a, 64); | ~~~~~~~~~~~~~~~~~~~~~~ 1278 | R4(a, b, c, d, e, 65); | ~~~~~~~~~~~~~~~~~~~~~~ 1279 | R4(e, a, b, c, d, 66); | ~~~~~~~~~~~~~~~~~~~~~~ 1280 | R4(d, e, a, b, c, 67); | ~~~~~~~~~~~~~~~~~~~~~~ 1281 | R4(c, d, e, a, b, 68); | ~~~~~~~~~~~~~~~~~~~~~~ 1282 | R4(b, c, d, e, a, 69); | ~~~~~~~~~~~~~~~~~~~~~~ 1283 | R4(a, b, c, d, e, 70); | ~~~~~~~~~~~~~~~~~~~~~~ 1284 | R4(e, a, b, c, d, 71); | ~~~~~~~~~~~~~~~~~~~~~~ 1285 | R4(d, e, a, b, c, 72); | ~~~~~~~~~~~~~~~~~~~~~~ 1286 | R4(c, d, e, a, b, 73); | ~~~~~~~~~~~~~~~~~~~~~~ 1287 | R4(b, c, d, e, a, 74); | ~~~~~~~~~~~~~~~~~~~~~~ 1288 | R4(a, b, c, d, e, 75); | ~~~~~~~~~~~~~~~~~~~~~~ 1289 | R4(e, a, b, c, d, 76); | ~~~~~~~~~~~~~~~~~~~~~~ 1290 | R4(d, e, a, b, c, 77); | ~~~~~~~~~~~~~~~~~~~~~~ 1291 | R4(c, d, e, a, b, 78); | ~~~~~~~~~~~~~~~~~~~~~~ 1292 | R4(b, c, d, e, a, 79); | ~~~~~~~~~~~~~~~~~~~~~~ 1293 | state[0] += a; | ~~~~~~~~~~~~~~ 1294 | state[1] += b; | ~~~~~~~~~~~~~~ 1295 | state[2] += c; | ~~~~~~~~~~~~~~ 1296 | state[3] += d; | ~~~~~~~~~~~~~~ 1297 | state[4] += e; | ~~~~~~~~~~~~~~ 1298 | /* Erase working structures. The order of operations is important, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1299 | * used to ensure that compiler doesn't optimize those out. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1300 | memset(block, 0, sizeof(block)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 | a = b = c = d = e = 0; | ~~~~~~~~~~~~~~~~~~~~~~ 1302 | (void) a; | ~~~~~~~~~ 1303 | (void) b; | ~~~~~~~~~ 1304 | (void) c; | ~~~~~~~~~ 1305 | (void) d; | ~~~~~~~~~ 1306 | (void) e; | ~~~~~~~~~ 1307 | } | ~ 1308 | | 1309 | void cs_sha1_init(cs_sha1_ctx *context) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1310 | context->state[0] = 0x67452301; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1311 | context->state[1] = 0xEFCDAB89; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1312 | context->state[2] = 0x98BADCFE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1313 | context->state[3] = 0x10325476; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1314 | context->state[4] = 0xC3D2E1F0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1315 | context->count[0] = context->count[1] = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1316 | } | ~ 1317 | | 1318 | void cs_sha1_update(cs_sha1_ctx *context, const unsigned char *data, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1319 | uint32_t len) { | ~~~~~~~~~~~~~~~ 1320 | uint32_t i, j; | ~~~~~~~~~~~~~~ 1321 | | 1322 | j = context->count[0]; | ~~~~~~~~~~~~~~~~~~~~~~ 1323 | if ((context->count[0] += len << 3) < j) context->count[1]++; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1324 | context->count[1] += (len >> 29); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1325 | j = (j >> 3) & 63; | ~~~~~~~~~~~~~~~~~~ 1326 | if ((j + len) > 63) { | ~~~~~~~~~~~~~~~~~~~~~ 1327 | memcpy(&context->buffer[j], data, (i = 64 - j)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1328 | cs_sha1_transform(context->state, context->buffer); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1329 | for (; i + 63 < len; i += 64) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1330 | cs_sha1_transform(context->state, &data[i]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 | } | ~ 1332 | j = 0; | ~~~~~~ 1333 | } else | ~~~~~~ 1334 | i = 0; | ~~~~~~ 1335 | memcpy(&context->buffer[j], &data[i], len - i); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1336 | } | ~ 1337 | | 1338 | void cs_sha1_final(unsigned char digest[20], cs_sha1_ctx *context) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1339 | unsigned i; | ~~~~~~~~~~~ 1340 | unsigned char finalcount[8], c; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1341 | | 1342 | for (i = 0; i < 8; i++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~ 1343 | finalcount[i] = (unsigned char) ((context->count[(i >= 4 ? 0 : 1)] >> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1344 | ((3 - (i & 3)) * 8)) & | ~~~~~~~~~~~~~~~~~~~~~~ 1345 | 255); | ~~~~~ 1346 | } | ~ 1347 | c = 0200; | ~~~~~~~~~ 1348 | cs_sha1_update(context, &c, 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1349 | while ((context->count[0] & 504) != 448) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1350 | c = 0000; | ~~~~~~~~~ 1351 | cs_sha1_update(context, &c, 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1352 | } | ~ 1353 | cs_sha1_update(context, finalcount, 8); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1354 | for (i = 0; i < 20; i++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1355 | digest[i] = | ~~~~~~~~~~~ 1356 | (unsigned char) ((context->state[i >> 2] >> ((3 - (i & 3)) * 8)) & 255); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1357 | } | ~ 1358 | memset(context, '\0', sizeof(*context)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1359 | memset(&finalcount, '\0', sizeof(finalcount)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1360 | } | ~ 1361 | | 1362 | void cs_hmac_sha1(const unsigned char *key, size_t keylen, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1363 | const unsigned char *data, size_t datalen, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1364 | unsigned char out[20]) { | ~~~~~~~~~~~~~~~~~~~~~~~~ 1365 | cs_sha1_ctx ctx; | ~~~~~~~~~~~~~~~~ 1366 | unsigned char buf1[64], buf2[64], tmp_key[20], i; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1367 | | 1368 | if (keylen > sizeof(buf1)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1369 | cs_sha1_init(&ctx); | ~~~~~~~~~~~~~~~~~~~ 1370 | cs_sha1_update(&ctx, key, keylen); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1371 | cs_sha1_final(tmp_key, &ctx); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1372 | key = tmp_key; | ~~~~~~~~~~~~~~ 1373 | keylen = sizeof(tmp_key); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 1374 | } | ~ 1375 | | 1376 | memset(buf1, 0, sizeof(buf1)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1377 | memset(buf2, 0, sizeof(buf2)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1378 | memcpy(buf1, key, keylen); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1379 | memcpy(buf2, key, keylen); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1380 | | 1381 | for (i = 0; i < sizeof(buf1); i++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1382 | buf1[i] ^= 0x36; | ~~~~~~~~~~~~~~~~ 1383 | buf2[i] ^= 0x5c; | ~~~~~~~~~~~~~~~~ 1384 | } | ~ 1385 | | 1386 | cs_sha1_init(&ctx); | ~~~~~~~~~~~~~~~~~~~ 1387 | cs_sha1_update(&ctx, buf1, sizeof(buf1)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1388 | cs_sha1_update(&ctx, data, datalen); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1389 | cs_sha1_final(out, &ctx); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 1390 | | 1391 | cs_sha1_init(&ctx); | ~~~~~~~~~~~~~~~~~~~ 1392 | cs_sha1_update(&ctx, buf2, sizeof(buf2)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1393 | cs_sha1_update(&ctx, out, 20); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1394 | cs_sha1_final(out, &ctx); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 1395 | } | ~ 1396 | | 1397 | #endif /* EXCLUDE_COMMON */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1398 | #ifdef MG_MODULE_LINES | ~~~~~~~~~~~~~~~~~~~~~~ 1399 | #line 1 "common/mbuf.c" | ~~~~~~~~~~~~~~~~~~~~~~~ 1400 | #endif | ~~~~~~ 1401 | /* | ~~ 1402 | * Copyright (c) 2014 Cesanta Software Limited | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1403 | * All rights reserved | ~~~~~~~~~~~~~~~~~~~~~ 1404 | */ | ~~ 1405 | | 1406 | #ifndef EXCLUDE_COMMON | ~~~~~~~~~~~~~~~~~~~~~~ 1407 | | 1408 | #include | ~~~~~~~~~~~~~~~~~~~ 1409 | #include | ~~~~~~~~~~~~~~~~~~~ 1410 | /* Amalgamated: #include "common/mbuf.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1411 | | 1412 | #ifndef MBUF_REALLOC | ~~~~~~~~~~~~~~~~~~~~ 1413 | #define MBUF_REALLOC realloc | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1414 | #endif | ~~~~~~ 1415 | | 1416 | #ifndef MBUF_FREE | ~~~~~~~~~~~~~~~~~ 1417 | #define MBUF_FREE free | ~~~~~~~~~~~~~~~~~~~~~~ 1418 | #endif | ~~~~~~ 1419 | | 1420 | void mbuf_init(struct mbuf *mbuf, size_t initial_size) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1421 | void mbuf_init(struct mbuf *mbuf, size_t initial_size) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1422 | mbuf->len = mbuf->size = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1423 | mbuf->buf = NULL; | ~~~~~~~~~~~~~~~~~ 1424 | mbuf_resize(mbuf, initial_size); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1425 | } | ~ 1426 | | 1427 | void mbuf_free(struct mbuf *mbuf) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1428 | void mbuf_free(struct mbuf *mbuf) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1429 | if (mbuf->buf != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~ 1430 | MBUF_FREE(mbuf->buf); | ~~~~~~~~~~~~~~~~~~~~~ 1431 | mbuf_init(mbuf, 0); | ~~~~~~~~~~~~~~~~~~~ 1432 | } | ~ 1433 | } | ~ 1434 | | 1435 | void mbuf_resize(struct mbuf *a, size_t new_size) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1436 | void mbuf_resize(struct mbuf *a, size_t new_size) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1437 | if (new_size > a->size || (new_size < a->size && new_size >= a->len)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1438 | char *buf = (char *) MBUF_REALLOC(a->buf, new_size); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1439 | /* | ~~ 1440 | * In case realloc fails, there's not much we can do, except keep things as | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1441 | * they are. Note that NULL is a valid return value from realloc when | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1442 | * size == 0, but that is covered too. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1443 | */ | ~~ 1444 | if (buf == NULL && new_size != 0) return; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1445 | a->buf = buf; | ~~~~~~~~~~~~~ 1446 | a->size = new_size; | ~~~~~~~~~~~~~~~~~~~ 1447 | } | ~ 1448 | } | ~ 1449 | | 1450 | void mbuf_trim(struct mbuf *mbuf) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1451 | void mbuf_trim(struct mbuf *mbuf) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1452 | mbuf_resize(mbuf, mbuf->len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1453 | } | ~ 1454 | | 1455 | size_t mbuf_insert(struct mbuf *a, size_t off, const void *buf, size_t) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1456 | size_t mbuf_insert(struct mbuf *a, size_t off, const void *buf, size_t len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1457 | char *p = NULL; | ~~~~~~~~~~~~~~~ 1458 | | 1459 | assert(a != NULL); | ~~~~~~~~~~~~~~~~~~ 1460 | assert(a->len <= a->size); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1461 | assert(off <= a->len); | ~~~~~~~~~~~~~~~~~~~~~~ 1462 | | 1463 | /* check overflow */ | ~~~~~~~~~~~~~~~~~~~~ 1464 | if (~(size_t) 0 - (size_t) a->buf < len) return 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1465 | | 1466 | if (a->len + len <= a->size) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1467 | memmove(a->buf + off + len, a->buf + off, a->len - off); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1468 | if (buf != NULL) { | ~~~~~~~~~~~~~~~~~~ 1469 | memcpy(a->buf + off, buf, len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1470 | } | ~ 1471 | a->len += len; | ~~~~~~~~~~~~~~ 1472 | } else { | ~~~~~~~~ 1473 | size_t new_size = (size_t)((a->len + len) * MBUF_SIZE_MULTIPLIER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1474 | if ((p = (char *) MBUF_REALLOC(a->buf, new_size)) != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1475 | a->buf = p; | ~~~~~~~~~~~ 1476 | memmove(a->buf + off + len, a->buf + off, a->len - off); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1477 | if (buf != NULL) memcpy(a->buf + off, buf, len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1478 | a->len += len; | ~~~~~~~~~~~~~~ 1479 | a->size = new_size; | ~~~~~~~~~~~~~~~~~~~ 1480 | } else { | ~~~~~~~~ 1481 | len = 0; | ~~~~~~~~ 1482 | } | ~ 1483 | } | ~ 1484 | | 1485 | return len; | ~~~~~~~~~~~ 1486 | } | ~ 1487 | | 1488 | size_t mbuf_append(struct mbuf *a, const void *buf, size_t len) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1489 | size_t mbuf_append(struct mbuf *a, const void *buf, size_t len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1490 | return mbuf_insert(a, a->len, buf, len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1491 | } | ~ 1492 | | 1493 | void mbuf_remove(struct mbuf *mb, size_t n) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1494 | void mbuf_remove(struct mbuf *mb, size_t n) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1495 | if (n > 0 && n <= mb->len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1496 | memmove(mb->buf, mb->buf + n, mb->len - n); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1497 | mb->len -= n; | ~~~~~~~~~~~~~ 1498 | } | ~ 1499 | } | ~ 1500 | | 1501 | #endif /* EXCLUDE_COMMON */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1502 | #ifdef MG_MODULE_LINES | ~~~~~~~~~~~~~~~~~~~~~~ 1503 | #line 1 "common/mg_str.c" | ~~~~~~~~~~~~~~~~~~~~~~~~~ 1504 | #endif | ~~~~~~ 1505 | /* | ~~ 1506 | * Copyright (c) 2014-2016 Cesanta Software Limited | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1507 | * All rights reserved | ~~~~~~~~~~~~~~~~~~~~~ 1508 | */ | ~~ 1509 | | 1510 | /* Amalgamated: #include "common/mg_mem.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1511 | /* Amalgamated: #include "common/mg_str.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1512 | | 1513 | #include | ~~~~~~~~~~~~~~~~~~~ 1514 | #include | ~~~~~~~~~~~~~~~~~~~ 1515 | | 1516 | int mg_ncasecmp(const char *s1, const char *s2, size_t len) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1517 | | 1518 | struct mg_str mg_mk_str(const char *s) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1519 | struct mg_str mg_mk_str(const char *s) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1520 | struct mg_str ret = {s, 0}; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1521 | if (s != NULL) ret.len = strlen(s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1522 | return ret; | ~~~~~~~~~~~ 1523 | } | ~ 1524 | | 1525 | struct mg_str mg_mk_str_n(const char *s, size_t len) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1526 | struct mg_str mg_mk_str_n(const char *s, size_t len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1527 | struct mg_str ret = {s, len}; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1528 | return ret; | ~~~~~~~~~~~ 1529 | } | ~ 1530 | | 1531 | int mg_vcmp(const struct mg_str *str1, const char *str2) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1532 | int mg_vcmp(const struct mg_str *str1, const char *str2) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1533 | size_t n2 = strlen(str2), n1 = str1->len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1534 | int r = strncmp(str1->p, str2, (n1 < n2) ? n1 : n2); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1535 | if (r == 0) { | ~~~~~~~~~~~~~ 1536 | return n1 - n2; | ~~~~~~~~~~~~~~~ 1537 | } | ~ 1538 | return r; | ~~~~~~~~~ 1539 | } | ~ 1540 | | 1541 | int mg_vcasecmp(const struct mg_str *str1, const char *str2) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1542 | int mg_vcasecmp(const struct mg_str *str1, const char *str2) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1543 | size_t n2 = strlen(str2), n1 = str1->len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1544 | int r = mg_ncasecmp(str1->p, str2, (n1 < n2) ? n1 : n2); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1545 | if (r == 0) { | ~~~~~~~~~~~~~ 1546 | return n1 - n2; | ~~~~~~~~~~~~~~~ 1547 | } | ~ 1548 | return r; | ~~~~~~~~~ 1549 | } | ~ 1550 | | 1551 | static struct mg_str mg_strdup_common(const struct mg_str s, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1552 | int nul_terminate) { | ~~~~~~~~~~~~~~~~~~~~ 1553 | struct mg_str r = {NULL, 0}; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1554 | if (s.len > 0 && s.p != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1555 | char *sc = (char *) MG_MALLOC(s.len + (nul_terminate ? 1 : 0)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1556 | if (sc != NULL) { | ~~~~~~~~~~~~~~~~~ 1557 | memcpy(sc, s.p, s.len); | ~~~~~~~~~~~~~~~~~~~~~~~ 1558 | if (nul_terminate) sc[s.len] = '\0'; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1559 | r.p = sc; | ~~~~~~~~~ 1560 | r.len = s.len; | ~~~~~~~~~~~~~~ 1561 | } | ~ 1562 | } | ~ 1563 | return r; | ~~~~~~~~~ 1564 | } | ~ 1565 | | 1566 | struct mg_str mg_strdup(const struct mg_str s) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1567 | struct mg_str mg_strdup(const struct mg_str s) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1568 | return mg_strdup_common(s, 0 /* NUL-terminate */); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1569 | } | ~ 1570 | | 1571 | struct mg_str mg_strdup_nul(const struct mg_str s) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1572 | struct mg_str mg_strdup_nul(const struct mg_str s) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1573 | return mg_strdup_common(s, 1 /* NUL-terminate */); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1574 | } | ~ 1575 | | 1576 | const char *mg_strchr(const struct mg_str s, int c) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1577 | const char *mg_strchr(const struct mg_str s, int c) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1578 | size_t i; | ~~~~~~~~~ 1579 | for (i = 0; i < s.len; i++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1580 | if (s.p[i] == c) return &s.p[i]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1581 | } | ~ 1582 | return NULL; | ~~~~~~~~~~~~ 1583 | } | ~ 1584 | | 1585 | int mg_strcmp(const struct mg_str str1, const struct mg_str str2) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1586 | int mg_strcmp(const struct mg_str str1, const struct mg_str str2) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1587 | size_t i = 0; | ~~~~~~~~~~~~~ 1588 | while (i < str1.len && i < str2.len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1589 | if (str1.p[i] < str2.p[i]) return -1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1590 | if (str1.p[i] > str2.p[i]) return 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1591 | i++; | ~~~~ 1592 | } | ~ 1593 | if (i < str1.len) return 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1594 | if (i < str2.len) return -1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1595 | return 0; | ~~~~~~~~~ 1596 | } | ~ 1597 | | 1598 | int mg_strncmp(const struct mg_str, const struct mg_str, size_t n) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1599 | int mg_strncmp(const struct mg_str str1, const struct mg_str str2, size_t n) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1600 | struct mg_str s1 = str1; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1601 | struct mg_str s2 = str2; | ~~~~~~~~~~~~~~~~~~~~~~~~ 1602 | | 1603 | if (s1.len > n) { | ~~~~~~~~~~~~~~~~~ 1604 | s1.len = n; | ~~~~~~~~~~~ 1605 | } | ~ 1606 | if (s2.len > n) { | ~~~~~~~~~~~~~~~~~ 1607 | s2.len = n; | ~~~~~~~~~~~ 1608 | } | ~ 1609 | return mg_strcmp(s1, s2); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 1610 | } | ~ 1611 | | 1612 | const char *mg_strstr(const struct mg_str haystack, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1613 | const struct mg_str needle) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1614 | const char *mg_strstr(const struct mg_str haystack, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1615 | const struct mg_str needle) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1616 | size_t i; | ~~~~~~~~~ 1617 | if (needle.len > haystack.len) return NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1618 | for (i = 0; i <= haystack.len - needle.len; i++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1619 | if (memcmp(haystack.p + i, needle.p, needle.len) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1620 | return haystack.p + i; | ~~~~~~~~~~~~~~~~~~~~~~ 1621 | } | ~ 1622 | } | ~ 1623 | return NULL; | ~~~~~~~~~~~~ 1624 | } | ~ 1625 | #ifdef MG_MODULE_LINES | ~~~~~~~~~~~~~~~~~~~~~~ 1626 | #line 1 "common/str_util.c" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1627 | #endif | ~~~~~~ 1628 | /* | ~~ 1629 | * Copyright (c) 2015 Cesanta Software Limited | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1630 | * All rights reserved | ~~~~~~~~~~~~~~~~~~~~~ 1631 | */ | ~~ 1632 | | 1633 | #ifndef EXCLUDE_COMMON | ~~~~~~~~~~~~~~~~~~~~~~ 1634 | | 1635 | /* Amalgamated: #include "common/str_util.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1636 | /* Amalgamated: #include "common/mg_mem.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1637 | /* Amalgamated: #include "common/platform.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1638 | | 1639 | #ifndef C_DISABLE_BUILTIN_SNPRINTF | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1640 | #define C_DISABLE_BUILTIN_SNPRINTF 0 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1641 | #endif | ~~~~~~ 1642 | | 1643 | /* Amalgamated: #include "common/mg_mem.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1644 | | 1645 | size_t c_strnlen(const char *s, size_t maxlen) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1646 | size_t c_strnlen(const char *s, size_t maxlen) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1647 | size_t l = 0; | ~~~~~~~~~~~~~ 1648 | for (; l < maxlen && s[l] != '\0'; l++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1649 | } | ~ 1650 | return l; | ~~~~~~~~~ 1651 | } | ~ 1652 | | 1653 | #define C_SNPRINTF_APPEND_CHAR(ch) \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1654 | do { \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1655 | if (i < (int) buf_size) buf[i] = ch; \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1656 | i++; \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1657 | } while (0) | ~~~~~~~~~~~ 1658 | | 1659 | #define C_SNPRINTF_FLAG_ZERO 1 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1660 | | 1661 | #if C_DISABLE_BUILTIN_SNPRINTF | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1662 | int c_vsnprintf(char *buf, size_t buf_size, const char *fmt, va_list ap) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1663 | int c_vsnprintf(char *buf, size_t buf_size, const char *fmt, va_list ap) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1664 | return vsnprintf(buf, buf_size, fmt, ap); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1665 | } | ~ 1666 | #else | ~~~~~ 1667 | static int c_itoa(char *buf, size_t buf_size, int64_t num, int base, int flags, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1668 | int field_width) { | ~~~~~~~~~~~~~~~~~~ 1669 | char tmp[40]; | ~~~~~~~~~~~~~ 1670 | int i = 0, k = 0, neg = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1671 | | 1672 | if (num < 0) { | ~~~~~~~~~~~~~~ 1673 | neg++; | ~~~~~~ 1674 | num = -num; | ~~~~~~~~~~~ 1675 | } | ~ 1676 | | 1677 | /* Print into temporary buffer - in reverse order */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1678 | do { | ~~~~ 1679 | int rem = num % base; | ~~~~~~~~~~~~~~~~~~~~~ 1680 | if (rem < 10) { | ~~~~~~~~~~~~~~~ 1681 | tmp[k++] = '0' + rem; | ~~~~~~~~~~~~~~~~~~~~~ 1682 | } else { | ~~~~~~~~ 1683 | tmp[k++] = 'a' + (rem - 10); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1684 | } | ~ 1685 | num /= base; | ~~~~~~~~~~~~ 1686 | } while (num > 0); | ~~~~~~~~~~~~~~~~~~ 1687 | | 1688 | /* Zero padding */ | ~~~~~~~~~~~~~~~~~~ 1689 | if (flags && C_SNPRINTF_FLAG_ZERO) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1690 | while (k < field_width && k < (int) sizeof(tmp) - 1) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1691 | tmp[k++] = '0'; | ~~~~~~~~~~~~~~~ 1692 | } | ~ 1693 | } | ~ 1694 | | 1695 | /* And sign */ | ~~~~~~~~~~~~~~ 1696 | if (neg) { | ~~~~~~~~~~ 1697 | tmp[k++] = '-'; | ~~~~~~~~~~~~~~~ 1698 | } | ~ 1699 | | 1700 | /* Now output */ | ~~~~~~~~~~~~~~~~ 1701 | while (--k >= 0) { | ~~~~~~~~~~~~~~~~~~ 1702 | C_SNPRINTF_APPEND_CHAR(tmp[k]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1703 | } | ~ 1704 | | 1705 | return i; | ~~~~~~~~~ 1706 | } | ~ 1707 | | 1708 | int c_vsnprintf(char *buf, size_t buf_size, const char *fmt, va_list ap) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1709 | int c_vsnprintf(char *buf, size_t buf_size, const char *fmt, va_list ap) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1710 | int ch, i = 0, len_mod, flags, precision, field_width; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1711 | | 1712 | while ((ch = *fmt++) != '\0') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1713 | if (ch != '%') { | ~~~~~~~~~~~~~~~~ 1714 | C_SNPRINTF_APPEND_CHAR(ch); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1715 | } else { | ~~~~~~~~ 1716 | /* | ~~ 1717 | * Conversion specification: | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1718 | * zero or more flags (one of: # 0 - + ') | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1719 | * an optional minimum field width (digits) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1720 | * an optional precision (. followed by digits, or *) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1721 | * an optional length modifier (one of: hh h l ll L q j z t) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1722 | * conversion specifier (one of: d i o u x X e E f F g G a A c s p n) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1723 | */ | ~~ 1724 | flags = field_width = precision = len_mod = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1725 | | 1726 | /* Flags. only zero-pad flag is supported. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1727 | if (*fmt == '0') { | ~~~~~~~~~~~~~~~~~~ 1728 | flags |= C_SNPRINTF_FLAG_ZERO; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1729 | } | ~ 1730 | | 1731 | /* Field width */ | ~~~~~~~~~~~~~~~~~ 1732 | while (*fmt >= '0' && *fmt <= '9') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1733 | field_width *= 10; | ~~~~~~~~~~~~~~~~~~ 1734 | field_width += *fmt++ - '0'; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1735 | } | ~ 1736 | /* Dynamic field width */ | ~~~~~~~~~~~~~~~~~~~~~~~~~ 1737 | if (*fmt == '*') { | ~~~~~~~~~~~~~~~~~~ 1738 | field_width = va_arg(ap, int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1739 | fmt++; | ~~~~~~ 1740 | } | ~ 1741 | | 1742 | /* Precision */ | ~~~~~~~~~~~~~~~ 1743 | if (*fmt == '.') { | ~~~~~~~~~~~~~~~~~~ 1744 | fmt++; | ~~~~~~ 1745 | if (*fmt == '*') { | ~~~~~~~~~~~~~~~~~~ 1746 | precision = va_arg(ap, int); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1747 | fmt++; | ~~~~~~ 1748 | } else { | ~~~~~~~~ 1749 | while (*fmt >= '0' && *fmt <= '9') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1750 | precision *= 10; | ~~~~~~~~~~~~~~~~ 1751 | precision += *fmt++ - '0'; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1752 | } | ~ 1753 | } | ~ 1754 | } | ~ 1755 | | 1756 | /* Length modifier */ | ~~~~~~~~~~~~~~~~~~~~~ 1757 | switch (*fmt) { | ~~~~~~~~~~~~~~~ 1758 | case 'h': | ~~~~~~~~~ 1759 | case 'l': | ~~~~~~~~~ 1760 | case 'L': | ~~~~~~~~~ 1761 | case 'I': | ~~~~~~~~~ 1762 | case 'q': | ~~~~~~~~~ 1763 | case 'j': | ~~~~~~~~~ 1764 | case 'z': | ~~~~~~~~~ 1765 | case 't': | ~~~~~~~~~ 1766 | len_mod = *fmt++; | ~~~~~~~~~~~~~~~~~ 1767 | if (*fmt == 'h') { | ~~~~~~~~~~~~~~~~~~ 1768 | len_mod = 'H'; | ~~~~~~~~~~~~~~ 1769 | fmt++; | ~~~~~~ 1770 | } | ~ 1771 | if (*fmt == 'l') { | ~~~~~~~~~~~~~~~~~~ 1772 | len_mod = 'q'; | ~~~~~~~~~~~~~~ 1773 | fmt++; | ~~~~~~ 1774 | } | ~ 1775 | break; | ~~~~~~ 1776 | } | ~ 1777 | | 1778 | ch = *fmt++; | ~~~~~~~~~~~~ 1779 | if (ch == 's') { | ~~~~~~~~~~~~~~~~ 1780 | const char *s = va_arg(ap, const char *); /* Always fetch parameter */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1781 | int j; | ~~~~~~ 1782 | int pad = field_width - (precision >= 0 ? c_strnlen(s, precision) : 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1783 | for (j = 0; j < pad; j++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1784 | C_SNPRINTF_APPEND_CHAR(' '); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1785 | } | ~ 1786 | | 1787 | /* `s` may be NULL in case of %.*s */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1788 | if (s != NULL) { | ~~~~~~~~~~~~~~~~ 1789 | /* Ignore negative and 0 precisions */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1790 | for (j = 0; (precision <= 0 || j < precision) && s[j] != '\0'; j++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1791 | C_SNPRINTF_APPEND_CHAR(s[j]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1792 | } | ~ 1793 | } | ~ 1794 | } else if (ch == 'c') { | ~~~~~~~~~~~~~~~~~~~~~~~ 1795 | ch = va_arg(ap, int); /* Always fetch parameter */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1796 | C_SNPRINTF_APPEND_CHAR(ch); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1797 | } else if (ch == 'd' && len_mod == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1798 | i += c_itoa(buf + i, buf_size - i, va_arg(ap, int), 10, flags, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1799 | field_width); | ~~~~~~~~~~~~~ 1800 | } else if (ch == 'd' && len_mod == 'l') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1801 | i += c_itoa(buf + i, buf_size - i, va_arg(ap, long), 10, flags, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1802 | field_width); | ~~~~~~~~~~~~~ 1803 | #ifdef SSIZE_MAX | ~~~~~~~~~~~~~~~~ 1804 | } else if (ch == 'd' && len_mod == 'z') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1805 | i += c_itoa(buf + i, buf_size - i, va_arg(ap, ssize_t), 10, flags, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1806 | field_width); | ~~~~~~~~~~~~~ 1807 | #endif | ~~~~~~ 1808 | } else if (ch == 'd' && len_mod == 'q') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1809 | i += c_itoa(buf + i, buf_size - i, va_arg(ap, int64_t), 10, flags, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1810 | field_width); | ~~~~~~~~~~~~~ 1811 | } else if ((ch == 'x' || ch == 'u') && len_mod == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1812 | i += c_itoa(buf + i, buf_size - i, va_arg(ap, unsigned), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1813 | ch == 'x' ? 16 : 10, flags, field_width); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1814 | } else if ((ch == 'x' || ch == 'u') && len_mod == 'l') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1815 | i += c_itoa(buf + i, buf_size - i, va_arg(ap, unsigned long), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1816 | ch == 'x' ? 16 : 10, flags, field_width); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1817 | } else if ((ch == 'x' || ch == 'u') && len_mod == 'z') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1818 | i += c_itoa(buf + i, buf_size - i, va_arg(ap, size_t), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1819 | ch == 'x' ? 16 : 10, flags, field_width); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1820 | } else if (ch == 'p') { | ~~~~~~~~~~~~~~~~~~~~~~~ 1821 | unsigned long num = (unsigned long) (uintptr_t) va_arg(ap, void *); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1822 | C_SNPRINTF_APPEND_CHAR('0'); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1823 | C_SNPRINTF_APPEND_CHAR('x'); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1824 | i += c_itoa(buf + i, buf_size - i, num, 16, flags, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1825 | } else { | ~~~~~~~~ 1826 | #ifndef NO_LIBC | ~~~~~~~~~~~~~~~ 1827 | /* | ~~ 1828 | * TODO(lsm): abort is not nice in a library, remove it | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1829 | * Also, ESP8266 SDK doesn't have it | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1830 | */ | ~~ 1831 | abort(); | ~~~~~~~~ 1832 | #endif | ~~~~~~ 1833 | } | ~ 1834 | } | ~ 1835 | } | ~ 1836 | | 1837 | /* Zero-terminate the result */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1838 | if (buf_size > 0) { | ~~~~~~~~~~~~~~~~~~~ 1839 | buf[i < (int) buf_size ? i : (int) buf_size - 1] = '\0'; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1840 | } | ~ 1841 | | 1842 | return i; | ~~~~~~~~~ 1843 | } | ~ 1844 | #endif | ~~~~~~ 1845 | | 1846 | int c_snprintf(char *buf, size_t buf_size, const char *fmt, ...) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1847 | int c_snprintf(char *buf, size_t buf_size, const char *fmt, ...) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1848 | int result; | ~~~~~~~~~~~ 1849 | va_list ap; | ~~~~~~~~~~~ 1850 | va_start(ap, fmt); | ~~~~~~~~~~~~~~~~~~ 1851 | result = c_vsnprintf(buf, buf_size, fmt, ap); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1852 | va_end(ap); | ~~~~~~~~~~~ 1853 | return result; | ~~~~~~~~~~~~~~ 1854 | } | ~ 1855 | | 1856 | #ifdef _WIN32 | ~~~~~~~~~~~~~ 1857 | int to_wchar(const char *path, wchar_t *wbuf, size_t wbuf_len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1858 | int ret; | ~~~~~~~~ 1859 | char buf[MAX_PATH * 2], buf2[MAX_PATH * 2], *p; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1860 | | 1861 | strncpy(buf, path, sizeof(buf)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1862 | buf[sizeof(buf) - 1] = '\0'; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1863 | | 1864 | /* Trim trailing slashes. Leave backslash for paths like "X:\" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1865 | p = buf + strlen(buf) - 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1866 | while (p > buf && p[-1] != ':' && (p[0] == '\\' || p[0] == '/')) *p-- = '\0'; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1867 | | 1868 | memset(wbuf, 0, wbuf_len * sizeof(wchar_t)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1869 | ret = MultiByteToWideChar(CP_UTF8, 0, buf, -1, wbuf, (int) wbuf_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1870 | | 1871 | /* | ~~ 1872 | * Convert back to Unicode. If doubly-converted string does not match the | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1873 | * original, something is fishy, reject. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1874 | */ | ~~ 1875 | WideCharToMultiByte(CP_UTF8, 0, wbuf, (int) wbuf_len, buf2, sizeof(buf2), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1876 | NULL, NULL); | ~~~~~~~~~~~~ 1877 | if (strcmp(buf, buf2) != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1878 | wbuf[0] = L'\0'; | ~~~~~~~~~~~~~~~~ 1879 | ret = 0; | ~~~~~~~~ 1880 | } | ~ 1881 | | 1882 | return ret; | ~~~~~~~~~~~ 1883 | } | ~ 1884 | #endif /* _WIN32 */ | ~~~~~~~~~~~~~~~~~~~ 1885 | | 1886 | /* The simplest O(mn) algorithm. Better implementation are GPLed */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1887 | const char *c_strnstr(const char *s, const char *find, size_t slen) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1888 | const char *c_strnstr(const char *s, const char *find, size_t slen) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1889 | size_t find_length = strlen(find); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1890 | size_t i; | ~~~~~~~~~ 1891 | | 1892 | for (i = 0; i < slen; i++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1893 | if (i + find_length > slen) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1894 | return NULL; | ~~~~~~~~~~~~ 1895 | } | ~ 1896 | | 1897 | if (strncmp(&s[i], find, find_length) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1898 | return &s[i]; | ~~~~~~~~~~~~~ 1899 | } | ~ 1900 | } | ~ 1901 | | 1902 | return NULL; | ~~~~~~~~~~~~ 1903 | } | ~ 1904 | | 1905 | #if CS_ENABLE_STRDUP | ~~~~~~~~~~~~~~~~~~~~ 1906 | char *strdup(const char *src) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1907 | char *strdup(const char *src) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1908 | size_t len = strlen(src) + 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1909 | char *ret = MG_MALLOC(len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1910 | if (ret != NULL) { | ~~~~~~~~~~~~~~~~~~ 1911 | strcpy(ret, src); | ~~~~~~~~~~~~~~~~~ 1912 | } | ~ 1913 | return ret; | ~~~~~~~~~~~ 1914 | } | ~ 1915 | #endif | ~~~~~~ 1916 | | 1917 | void cs_to_hex(char *to, const unsigned char *p, size_t len) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1918 | void cs_to_hex(char *to, const unsigned char *p, size_t len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1919 | static const char *hex = "0123456789abcdef"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1920 | | 1921 | for (; len--; p++) { | ~~~~~~~~~~~~~~~~~~~~ 1922 | *to++ = hex[p[0] >> 4]; | ~~~~~~~~~~~~~~~~~~~~~~~ 1923 | *to++ = hex[p[0] & 0x0f]; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 1924 | } | ~ 1925 | *to = '\0'; | ~~~~~~~~~~~ 1926 | } | ~ 1927 | | 1928 | static int fourbit(int ch) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1929 | if (ch >= '0' && ch <= '9') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1930 | return ch - '0'; | ~~~~~~~~~~~~~~~~ 1931 | } else if (ch >= 'a' && ch <= 'f') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1932 | return ch - 'a' + 10; | ~~~~~~~~~~~~~~~~~~~~~ 1933 | } else if (ch >= 'A' && ch <= 'F') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1934 | return ch - 'A' + 10; | ~~~~~~~~~~~~~~~~~~~~~ 1935 | } | ~ 1936 | return 0; | ~~~~~~~~~ 1937 | } | ~ 1938 | | 1939 | void cs_from_hex(char *to, const char *p, size_t len) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1940 | void cs_from_hex(char *to, const char *p, size_t len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1941 | size_t i; | ~~~~~~~~~ 1942 | | 1943 | for (i = 0; i < len; i += 2) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1944 | *to++ = (fourbit(p[i]) << 4) + fourbit(p[i + 1]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1945 | } | ~ 1946 | *to = '\0'; | ~~~~~~~~~~~ 1947 | } | ~ 1948 | | 1949 | #if CS_ENABLE_TO64 | ~~~~~~~~~~~~~~~~~~ 1950 | int64_t cs_to64(const char *s) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1951 | int64_t cs_to64(const char *s) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1952 | int64_t result = 0; | ~~~~~~~~~~~~~~~~~~~ 1953 | int64_t neg = 1; | ~~~~~~~~~~~~~~~~ 1954 | while (*s && isspace((unsigned char) *s)) s++; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1955 | if (*s == '-') { | ~~~~~~~~~~~~~~~~ 1956 | neg = -1; | ~~~~~~~~~ 1957 | s++; | ~~~~ 1958 | } | ~ 1959 | while (isdigit((unsigned char) *s)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1960 | result *= 10; | ~~~~~~~~~~~~~ 1961 | result += (*s - '0'); | ~~~~~~~~~~~~~~~~~~~~~ 1962 | s++; | ~~~~ 1963 | } | ~ 1964 | return result * neg; | ~~~~~~~~~~~~~~~~~~~~ 1965 | } | ~ 1966 | #endif | ~~~~~~ 1967 | | 1968 | static int str_util_lowercase(const char *s) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1969 | return tolower(*(const unsigned char *) s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1970 | } | ~ 1971 | | 1972 | int mg_ncasecmp(const char *s1, const char *s2, size_t len) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1973 | int mg_ncasecmp(const char *s1, const char *s2, size_t len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1974 | int diff = 0; | ~~~~~~~~~~~~~ 1975 | | 1976 | if (len > 0) do { | ~~~~~~~~~~~~~~~~~ 1977 | diff = str_util_lowercase(s1++) - str_util_lowercase(s2++); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1978 | } while (diff == 0 && s1[-1] != '\0' && --len > 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1979 | | 1980 | return diff; | ~~~~~~~~~~~~ 1981 | } | ~ 1982 | | 1983 | int mg_casecmp(const char *s1, const char *s2) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1984 | int mg_casecmp(const char *s1, const char *s2) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1985 | return mg_ncasecmp(s1, s2, (size_t) ~0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1986 | } | ~ 1987 | | 1988 | int mg_asprintf(char **buf, size_t size, const char *fmt, ...) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1989 | int mg_asprintf(char **buf, size_t size, const char *fmt, ...) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1990 | int ret; | ~~~~~~~~ 1991 | va_list ap; | ~~~~~~~~~~~ 1992 | va_start(ap, fmt); | ~~~~~~~~~~~~~~~~~~ 1993 | ret = mg_avprintf(buf, size, fmt, ap); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1994 | va_end(ap); | ~~~~~~~~~~~ 1995 | return ret; | ~~~~~~~~~~~ 1996 | } | ~ 1997 | | 1998 | int mg_avprintf(char **buf, size_t size, const char *fmt, va_list ap) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1999 | int mg_avprintf(char **buf, size_t size, const char *fmt, va_list ap) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2000 | va_list ap_copy; | ~~~~~~~~~~~~~~~~ 2001 | int len; | ~~~~~~~~ 2002 | | 2003 | va_copy(ap_copy, ap); | ~~~~~~~~~~~~~~~~~~~~~ 2004 | len = vsnprintf(*buf, size, fmt, ap_copy); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2005 | va_end(ap_copy); | ~~~~~~~~~~~~~~~~ 2006 | | 2007 | if (len < 0) { | ~~~~~~~~~~~~~~ 2008 | /* eCos and Windows are not standard-compliant and return -1 when | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2009 | * the buffer is too small. Keep allocating larger buffers until we | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2010 | * succeed or out of memory. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2011 | *buf = NULL; /* LCOV_EXCL_START */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2012 | while (len < 0) { | ~~~~~~~~~~~~~~~~~ 2013 | MG_FREE(*buf); | ~~~~~~~~~~~~~~ 2014 | if (size == 0) { | ~~~~~~~~~~~~~~~~ 2015 | size = 5; | ~~~~~~~~~ 2016 | } | ~ 2017 | size *= 2; | ~~~~~~~~~~ 2018 | if ((*buf = (char *) MG_MALLOC(size)) == NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2019 | len = -1; | ~~~~~~~~~ 2020 | break; | ~~~~~~ 2021 | } | ~ 2022 | va_copy(ap_copy, ap); | ~~~~~~~~~~~~~~~~~~~~~ 2023 | len = vsnprintf(*buf, size - 1, fmt, ap_copy); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2024 | va_end(ap_copy); | ~~~~~~~~~~~~~~~~ 2025 | } | ~ 2026 | | 2027 | /* | ~~ 2028 | * Microsoft version of vsnprintf() is not always null-terminated, so put | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2029 | * the terminator manually | ~~~~~~~~~~~~~~~~~~~~~~~~~ 2030 | */ | ~~ 2031 | (*buf)[len] = 0; | ~~~~~~~~~~~~~~~~ 2032 | /* LCOV_EXCL_STOP */ | ~~~~~~~~~~~~~~~~~~~~ 2033 | } else if (len >= (int) size) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2034 | /* Standard-compliant code path. Allocate a buffer that is large enough. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2035 | if ((*buf = (char *) MG_MALLOC(len + 1)) == NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2036 | len = -1; /* LCOV_EXCL_LINE */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2037 | } else { /* LCOV_EXCL_LINE */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2038 | va_copy(ap_copy, ap); | ~~~~~~~~~~~~~~~~~~~~~ 2039 | len = vsnprintf(*buf, len + 1, fmt, ap_copy); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2040 | va_end(ap_copy); | ~~~~~~~~~~~~~~~~ 2041 | } | ~ 2042 | } | ~ 2043 | | 2044 | return len; | ~~~~~~~~~~~ 2045 | } | ~ 2046 | | 2047 | const char *mg_next_comma_list_entry(const char *, struct mg_str *, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2048 | struct mg_str *) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~ 2049 | const char *mg_next_comma_list_entry(const char *list, struct mg_str *val, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2050 | struct mg_str *eq_val) { | ~~~~~~~~~~~~~~~~~~~~~~~~ 2051 | struct mg_str ret = mg_next_comma_list_entry_n(mg_mk_str(list), val, eq_val); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2052 | return ret.p; | ~~~~~~~~~~~~~ 2053 | } | ~ 2054 | | 2055 | struct mg_str mg_next_comma_list_entry_n(struct mg_str list, struct mg_str *val, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2056 | struct mg_str *eq_val) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2057 | struct mg_str mg_next_comma_list_entry_n(struct mg_str list, struct mg_str *val, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2058 | struct mg_str *eq_val) { | ~~~~~~~~~~~~~~~~~~~~~~~~ 2059 | if (list.len == 0) { | ~~~~~~~~~~~~~~~~~~~~ 2060 | /* End of the list */ | ~~~~~~~~~~~~~~~~~~~~~ 2061 | list = mg_mk_str(NULL); | ~~~~~~~~~~~~~~~~~~~~~~~ 2062 | } else { | ~~~~~~~~ 2063 | const char *chr = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~ 2064 | *val = list; | ~~~~~~~~~~~~ 2065 | | 2066 | if ((chr = mg_strchr(*val, ',')) != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2067 | /* Comma found. Store length and shift the list ptr */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2068 | val->len = chr - val->p; | ~~~~~~~~~~~~~~~~~~~~~~~~ 2069 | chr++; | ~~~~~~ 2070 | list.len -= (chr - list.p); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2071 | list.p = chr; | ~~~~~~~~~~~~~ 2072 | } else { | ~~~~~~~~ 2073 | /* This value is the last one */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2074 | list = mg_mk_str_n(list.p + list.len, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2075 | } | ~ 2076 | | 2077 | if (eq_val != NULL) { | ~~~~~~~~~~~~~~~~~~~~~ 2078 | /* Value has form "x=y", adjust pointers and lengths */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2079 | /* so that val points to "x", and eq_val points to "y". */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2080 | eq_val->len = 0; | ~~~~~~~~~~~~~~~~ 2081 | eq_val->p = (const char *) memchr(val->p, '=', val->len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2082 | if (eq_val->p != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~ 2083 | eq_val->p++; /* Skip over '=' character */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2084 | eq_val->len = val->p + val->len - eq_val->p; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2085 | val->len = (eq_val->p - val->p) - 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2086 | } | ~ 2087 | } | ~ 2088 | } | ~ 2089 | | 2090 | return list; | ~~~~~~~~~~~~ 2091 | } | ~ 2092 | | 2093 | size_t mg_match_prefix_n(const struct mg_str, const struct mg_str) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2094 | size_t mg_match_prefix_n(const struct mg_str pattern, const struct mg_str str) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2095 | const char *or_str; | ~~~~~~~~~~~~~~~~~~~ 2096 | size_t res = 0, len = 0, i = 0, j = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2097 | | 2098 | if ((or_str = (const char *) memchr(pattern.p, '|', pattern.len)) != NULL || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2099 | (or_str = (const char *) memchr(pattern.p, ',', pattern.len)) != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2100 | struct mg_str pstr = {pattern.p, (size_t)(or_str - pattern.p)}; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2101 | res = mg_match_prefix_n(pstr, str); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2102 | if (res > 0) return res; | ~~~~~~~~~~~~~~~~~~~~~~~~ 2103 | pstr.p = or_str + 1; | ~~~~~~~~~~~~~~~~~~~~ 2104 | pstr.len = (pattern.p + pattern.len) - (or_str + 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2105 | return mg_match_prefix_n(pstr, str); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2106 | } | ~ 2107 | | 2108 | for (; i < pattern.len && j < str.len; i++, j++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2109 | if (pattern.p[i] == '?') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 2110 | continue; | ~~~~~~~~~ 2111 | } else if (pattern.p[i] == '*') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2112 | i++; | ~~~~ 2113 | if (i < pattern.len && pattern.p[i] == '*') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2114 | i++; | ~~~~ 2115 | len = str.len - j; | ~~~~~~~~~~~~~~~~~~ 2116 | } else { | ~~~~~~~~ 2117 | len = 0; | ~~~~~~~~ 2118 | while (j + len < str.len && str.p[j + len] != '/') len++; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2119 | } | ~ 2120 | if (i == pattern.len || (pattern.p[i] == '$' && i == pattern.len - 1)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2121 | return j + len; | ~~~~~~~~~~~~~~~ 2122 | do { | ~~~~ 2123 | const struct mg_str pstr = {pattern.p + i, pattern.len - i}; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2124 | const struct mg_str sstr = {str.p + j + len, str.len - j - len}; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2125 | res = mg_match_prefix_n(pstr, sstr); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2126 | } while (res == 0 && len != 0 && len-- > 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2127 | return res == 0 ? 0 : j + res + len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2128 | } else if (str_util_lowercase(&pattern.p[i]) != | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2129 | str_util_lowercase(&str.p[j])) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2130 | break; | ~~~~~~ 2131 | } | ~ 2132 | } | ~ 2133 | if (i < pattern.len && pattern.p[i] == '$') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2134 | return j == str.len ? str.len : 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2135 | } | ~ 2136 | return i == pattern.len ? j : 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2137 | } | ~ 2138 | | 2139 | size_t mg_match_prefix(const char *, int, const char *) WEAK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2140 | size_t mg_match_prefix(const char *pattern, int pattern_len, const char *str) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2141 | const struct mg_str pstr = {pattern, (size_t) pattern_len}; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2142 | struct mg_str s = {str, 0}; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2143 | if (str != NULL) s.len = strlen(str); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2144 | return mg_match_prefix_n(pstr, s); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2145 | } | ~ 2146 | | 2147 | #endif /* EXCLUDE_COMMON */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2148 | #ifdef MG_MODULE_LINES | ~~~~~~~~~~~~~~~~~~~~~~ 2149 | #line 1 "mongoose/src/mg_net.c" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2150 | #endif | ~~~~~~ 2151 | /* | ~~ 2152 | * Copyright (c) 2014 Cesanta Software Limited | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2153 | * All rights reserved | ~~~~~~~~~~~~~~~~~~~~~ 2154 | * | ~ 2155 | * This software is dual-licensed: you can redistribute it and/or modify | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2156 | * it under the terms of the GNU General Public License version 2 as | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2157 | * published by the Free Software Foundation. For the terms of this | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2158 | * license, see . | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2159 | * | ~ 2160 | * You are free to use this software under the terms of the GNU General | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2161 | * Public License, but WITHOUT ANY WARRANTY; without even the implied | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2162 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2163 | * See the GNU General Public License for more details. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2164 | * | ~ 2165 | * Alternatively, you can license this software under a commercial | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2166 | * license, as set out in . | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2167 | */ | ~~ 2168 | | 2169 | /* Amalgamated: #include "common/cs_time.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2170 | /* Amalgamated: #include "mg_dns.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2171 | /* Amalgamated: #include "mg_internal.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2172 | /* Amalgamated: #include "mg_resolv.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2173 | /* Amalgamated: #include "mg_util.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2174 | | 2175 | #define MG_MAX_HOST_LEN 200 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2176 | | 2177 | #define MG_COPY_COMMON_CONNECTION_OPTIONS(dst, src) \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2178 | memcpy(dst, src, sizeof(*dst)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2179 | | 2180 | /* Which flags can be pre-set by the user at connection creation time. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2181 | #define _MG_ALLOWED_CONNECT_FLAGS_MASK \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2182 | (MG_F_USER_1 | MG_F_USER_2 | MG_F_USER_3 | MG_F_USER_4 | MG_F_USER_5 | \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2183 | MG_F_USER_6 | MG_F_WEBSOCKET_NO_DEFRAG | MG_F_ENABLE_BROADCAST) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2184 | /* Which flags should be modifiable by user's callbacks. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2185 | #define _MG_CALLBACK_MODIFIABLE_FLAGS_MASK \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2186 | (MG_F_USER_1 | MG_F_USER_2 | MG_F_USER_3 | MG_F_USER_4 | MG_F_USER_5 | \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2187 | MG_F_USER_6 | MG_F_WEBSOCKET_NO_DEFRAG | MG_F_SEND_AND_CLOSE | \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2188 | MG_F_CLOSE_IMMEDIATELY | MG_F_IS_WEBSOCKET | MG_F_DELETE_CHUNK) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2189 | | 2190 | #ifndef intptr_t | ~~~~~~~~~~~~~~~~ 2191 | #define intptr_t long | ~~~~~~~~~~~~~~~~~~~~~ 2192 | #endif | ~~~~~~ 2193 | | 2194 | MG_INTERNAL void mg_add_conn(struct mg_mgr *mgr, struct mg_connection *c) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2195 | DBG(("%p %p", mgr, c)); | ~~~~~~~~~~~~~~~~~~~~~~~ 2196 | c->mgr = mgr; | ~~~~~~~~~~~~~ 2197 | c->next = mgr->active_connections; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2198 | mgr->active_connections = c; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2199 | c->prev = NULL; | ~~~~~~~~~~~~~~~ 2200 | if (c->next != NULL) c->next->prev = c; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2201 | if (c->sock != INVALID_SOCKET) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2202 | c->iface->vtable->add_conn(c); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2203 | } | ~ 2204 | } | ~ 2205 | | 2206 | MG_INTERNAL void mg_remove_conn(struct mg_connection *conn) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2207 | if (conn->prev == NULL) conn->mgr->active_connections = conn->next; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2208 | if (conn->prev) conn->prev->next = conn->next; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2209 | if (conn->next) conn->next->prev = conn->prev; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2210 | conn->prev = conn->next = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2211 | conn->iface->vtable->remove_conn(conn); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2212 | } | ~ 2213 | | 2214 | MG_INTERNAL void mg_call(struct mg_connection *nc, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2215 | mg_event_handler_t ev_handler, void *user_data, int ev, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2216 | void *ev_data) { | ~~~~~~~~~~~~~~~~ 2217 | static int nesting_level = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2218 | nesting_level++; | ~~~~~~~~~~~~~~~~ 2219 | if (ev_handler == NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~ 2220 | /* | ~~ 2221 | * If protocol handler is specified, call it. Otherwise, call user-specified | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2222 | * event handler. | ~~~~~~~~~~~~~~~~ 2223 | */ | ~~ 2224 | ev_handler = nc->proto_handler ? nc->proto_handler : nc->handler; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2225 | } | ~ 2226 | if (ev != MG_EV_POLL) { | ~~~~~~~~~~~~~~~~~~~~~~~ 2227 | DBG(("%p %s ev=%d ev_data=%p flags=%lu rmbl=%d smbl=%d", nc, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2228 | ev_handler == nc->handler ? "user" : "proto", ev, ev_data, nc->flags, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2229 | (int) nc->recv_mbuf.len, (int) nc->send_mbuf.len)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2230 | } | ~ 2231 | | 2232 | #if !defined(NO_LIBC) && MG_ENABLE_HEXDUMP | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2233 | if (nc->mgr->hexdump_file != NULL && ev != MG_EV_POLL && ev != MG_EV_RECV && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2234 | ev != MG_EV_SEND /* handled separately */) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2235 | mg_hexdump_connection(nc, nc->mgr->hexdump_file, NULL, 0, ev); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2236 | } | ~ 2237 | #endif | ~~~~~~ 2238 | if (ev_handler != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~ 2239 | unsigned long flags_before = nc->flags; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2240 | size_t recv_mbuf_before = nc->recv_mbuf.len, recved; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2241 | ev_handler(nc, ev, ev_data MG_UD_ARG(user_data)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2242 | recved = (recv_mbuf_before - nc->recv_mbuf.len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2243 | /* Prevent user handler from fiddling with system flags. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2244 | if (ev_handler == nc->handler && nc->flags != flags_before) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2245 | nc->flags = (flags_before & ~_MG_CALLBACK_MODIFIABLE_FLAGS_MASK) | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2246 | (nc->flags & _MG_CALLBACK_MODIFIABLE_FLAGS_MASK); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2247 | } | ~ 2248 | /* It's important to not double-count recved bytes, and since mg_call can be | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2249 | * called recursively (e.g. proto_handler invokes user handler), we keep | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2250 | * track of recursion and only report received bytes at the top level. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2251 | if (nesting_level == 1 && recved > 0 && !(nc->flags & MG_F_UDP)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2252 | nc->iface->vtable->recved(nc, recved); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2253 | } | ~ 2254 | } | ~ 2255 | if (ev != MG_EV_POLL) { | ~~~~~~~~~~~~~~~~~~~~~~~ 2256 | DBG(("%p after %s flags=%lu rmbl=%d smbl=%d", nc, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2257 | ev_handler == nc->handler ? "user" : "proto", nc->flags, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2258 | (int) nc->recv_mbuf.len, (int) nc->send_mbuf.len)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2259 | } | ~ 2260 | nesting_level--; | ~~~~~~~~~~~~~~~~ 2261 | #if !MG_ENABLE_CALLBACK_USERDATA | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2262 | (void) user_data; | ~~~~~~~~~~~~~~~~~ 2263 | #endif | ~~~~~~ 2264 | } | ~ 2265 | | 2266 | void mg_if_timer(struct mg_connection *c, double now) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2267 | if (c->ev_timer_time > 0 && now >= c->ev_timer_time) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2268 | double old_value = c->ev_timer_time; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2269 | c->ev_timer_time = 0; | ~~~~~~~~~~~~~~~~~~~~~ 2270 | mg_call(c, NULL, c->user_data, MG_EV_TIMER, &old_value); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2271 | } | ~ 2272 | } | ~ 2273 | | 2274 | void mg_if_poll(struct mg_connection *nc, time_t now) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2275 | if (!(nc->flags & MG_F_SSL) || (nc->flags & MG_F_SSL_HANDSHAKE_DONE)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2276 | mg_call(nc, NULL, nc->user_data, MG_EV_POLL, &now); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2277 | } | ~ 2278 | } | ~ 2279 | | 2280 | void mg_destroy_conn(struct mg_connection *conn, int destroy_if) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2281 | if (destroy_if) conn->iface->vtable->destroy_conn(conn); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2282 | if (conn->proto_data != NULL && conn->proto_data_destructor != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2283 | conn->proto_data_destructor(conn->proto_data); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2284 | } | ~ 2285 | #if MG_ENABLE_SSL | ~~~~~~~~~~~~~~~~~ 2286 | mg_ssl_if_conn_free(conn); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 2287 | #endif | ~~~~~~ 2288 | mbuf_free(&conn->recv_mbuf); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2289 | mbuf_free(&conn->send_mbuf); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2290 | | 2291 | memset(conn, 0, sizeof(*conn)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2292 | MG_FREE(conn); | ~~~~~~~~~~~~~~ 2293 | } | ~ 2294 | | 2295 | void mg_close_conn(struct mg_connection *conn) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2296 | DBG(("%p %lu %d", conn, conn->flags, conn->sock)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2297 | #if MG_ENABLE_SSL | ~~~~~~~~~~~~~~~~~ 2298 | if (conn->flags & MG_F_SSL_HANDSHAKE_DONE) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2299 | mg_ssl_if_conn_close_notify(conn); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2300 | } | ~ 2301 | #endif | ~~~~~~ 2302 | mg_remove_conn(conn); | ~~~~~~~~~~~~~~~~~~~~~ 2303 | conn->iface->vtable->destroy_conn(conn); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2304 | mg_call(conn, NULL, conn->user_data, MG_EV_CLOSE, NULL); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2305 | mg_destroy_conn(conn, 0 /* destroy_if */); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2306 | } | ~ 2307 | | 2308 | void mg_mgr_init(struct mg_mgr *m, void *user_data) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2309 | struct mg_mgr_init_opts opts; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2310 | memset(&opts, 0, sizeof(opts)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2311 | mg_mgr_init_opt(m, user_data, opts); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2312 | } | ~ 2313 | | 2314 | void mg_mgr_init_opt(struct mg_mgr *m, void *user_data, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2315 | struct mg_mgr_init_opts opts) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2316 | memset(m, 0, sizeof(*m)); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 2317 | #if MG_ENABLE_BROADCAST | ~~~~~~~~~~~~~~~~~~~~~~~ 2318 | m->ctl[0] = m->ctl[1] = INVALID_SOCKET; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2319 | #endif | ~~~~~~ 2320 | m->user_data = user_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 2321 | | 2322 | #ifdef _WIN32 | ~~~~~~~~~~~~~ 2323 | { | ~ 2324 | WSADATA data; | ~~~~~~~~~~~~~ 2325 | WSAStartup(MAKEWORD(2, 2), &data); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2326 | } | ~ 2327 | #elif defined(__unix__) | ~~~~~~~~~~~~~~~~~~~~~~~ 2328 | /* Ignore SIGPIPE signal, so if client cancels the request, it | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2329 | * won't kill the whole process. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2330 | signal(SIGPIPE, SIG_IGN); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 2331 | #endif | ~~~~~~ 2332 | | 2333 | #if MG_ENABLE_SSL | ~~~~~~~~~~~~~~~~~ 2334 | { | ~ 2335 | static int init_done; | ~~~~~~~~~~~~~~~~~~~~~ 2336 | if (!init_done) { | ~~~~~~~~~~~~~~~~~ 2337 | mg_ssl_if_init(); | ~~~~~~~~~~~~~~~~~ 2338 | init_done++; | ~~~~~~~~~~~~ 2339 | } | ~ 2340 | } | ~ 2341 | #endif | ~~~~~~ 2342 | { | ~ 2343 | int i; | ~~~~~~ 2344 | if (opts.num_ifaces == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2345 | opts.num_ifaces = mg_num_ifaces; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2346 | opts.ifaces = mg_ifaces; | ~~~~~~~~~~~~~~~~~~~~~~~~ 2347 | } | ~ 2348 | if (opts.main_iface != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2349 | opts.ifaces[MG_MAIN_IFACE] = opts.main_iface; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2350 | } | ~ 2351 | m->num_ifaces = opts.num_ifaces; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2352 | m->ifaces = | ~~~~~~~~~~~ 2353 | (struct mg_iface **) MG_MALLOC(sizeof(*m->ifaces) * opts.num_ifaces); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2354 | for (i = 0; i < mg_num_ifaces; i++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2355 | m->ifaces[i] = mg_if_create_iface(opts.ifaces[i], m); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2356 | m->ifaces[i]->vtable->init(m->ifaces[i]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2357 | } | ~ 2358 | } | ~ 2359 | if (opts.nameserver != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2360 | m->nameserver = strdup(opts.nameserver); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2361 | } | ~ 2362 | DBG(("==================================")); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2363 | DBG(("init mgr=%p", m)); | ~~~~~~~~~~~~~~~~~~~~~~~~ 2364 | } | ~ 2365 | | 2366 | void mg_mgr_free(struct mg_mgr *m) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2367 | struct mg_connection *conn, *tmp_conn; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2368 | | 2369 | DBG(("%p", m)); | ~~~~~~~~~~~~~~~ 2370 | if (m == NULL) return; | ~~~~~~~~~~~~~~~~~~~~~~ 2371 | /* Do one last poll, see https://github.com/cesanta/mongoose/issues/286 */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2372 | mg_mgr_poll(m, 0); | ~~~~~~~~~~~~~~~~~~ 2373 | | 2374 | #if MG_ENABLE_BROADCAST | ~~~~~~~~~~~~~~~~~~~~~~~ 2375 | if (m->ctl[0] != INVALID_SOCKET) closesocket(m->ctl[0]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2376 | if (m->ctl[1] != INVALID_SOCKET) closesocket(m->ctl[1]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2377 | m->ctl[0] = m->ctl[1] = INVALID_SOCKET; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2378 | #endif | ~~~~~~ 2379 | | 2380 | for (conn = m->active_connections; conn != NULL; conn = tmp_conn) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2381 | tmp_conn = conn->next; | ~~~~~~~~~~~~~~~~~~~~~~ 2382 | mg_close_conn(conn); | ~~~~~~~~~~~~~~~~~~~~ 2383 | } | ~ 2384 | | 2385 | { | ~ 2386 | int i; | ~~~~~~ 2387 | for (i = 0; i < m->num_ifaces; i++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2388 | m->ifaces[i]->vtable->free(m->ifaces[i]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2389 | MG_FREE(m->ifaces[i]); | ~~~~~~~~~~~~~~~~~~~~~~ 2390 | } | ~ 2391 | MG_FREE(m->ifaces); | ~~~~~~~~~~~~~~~~~~~ 2392 | } | ~ 2393 | | 2394 | MG_FREE((char *) m->nameserver); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2395 | } | ~ 2396 | | 2397 | time_t mg_mgr_poll(struct mg_mgr *m, int timeout_ms) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2398 | int i; | ~~~~~~ 2399 | time_t now = 0; /* oh GCC, seriously ? */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2400 | | 2401 | if (m->num_ifaces == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~ 2402 | LOG(LL_ERROR, ("cannot poll: no interfaces")); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2403 | return 0; | ~~~~~~~~~ 2404 | } | ~ 2405 | | 2406 | for (i = 0; i < m->num_ifaces; i++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2407 | now = m->ifaces[i]->vtable->poll(m->ifaces[i], timeout_ms); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2408 | } | ~ 2409 | return now; | ~~~~~~~~~~~ 2410 | } | ~ 2411 | | 2412 | int mg_vprintf(struct mg_connection *nc, const char *fmt, va_list ap) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2413 | char mem[MG_VPRINTF_BUFFER_SIZE], *buf = mem; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2414 | int len; | ~~~~~~~~ 2415 | | 2416 | if ((len = mg_avprintf(&buf, sizeof(mem), fmt, ap)) > 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2417 | mg_send(nc, buf, len); | ~~~~~~~~~~~~~~~~~~~~~~ 2418 | } | ~ 2419 | if (buf != mem && buf != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2420 | MG_FREE(buf); /* LCOV_EXCL_LINE */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2421 | } /* LCOV_EXCL_LINE */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2422 | | 2423 | return len; | ~~~~~~~~~~~ 2424 | } | ~ 2425 | | 2426 | int mg_printf(struct mg_connection *conn, const char *fmt, ...) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2427 | int len; | ~~~~~~~~ 2428 | va_list ap; | ~~~~~~~~~~~ 2429 | va_start(ap, fmt); | ~~~~~~~~~~~~~~~~~~ 2430 | len = mg_vprintf(conn, fmt, ap); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2431 | va_end(ap); | ~~~~~~~~~~~ 2432 | return len; | ~~~~~~~~~~~ 2433 | } | ~ 2434 | | 2435 | #if MG_ENABLE_SYNC_RESOLVER | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2436 | /* TODO(lsm): use non-blocking resolver */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2437 | static int mg_resolve2(const char *host, struct in_addr *ina) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2438 | #if MG_ENABLE_GETADDRINFO | ~~~~~~~~~~~~~~~~~~~~~~~~~ 2439 | int rv = 0; | ~~~~~~~~~~~ 2440 | struct addrinfo hints, *servinfo, *p; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2441 | struct sockaddr_in *h = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2442 | memset(&hints, 0, sizeof hints); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2443 | hints.ai_family = AF_INET; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 2444 | hints.ai_socktype = SOCK_STREAM; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2445 | if ((rv = getaddrinfo(host, NULL, NULL, &servinfo)) != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2446 | DBG(("getaddrinfo(%s) failed: %s", host, strerror(mg_get_errno()))); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2447 | return 0; | ~~~~~~~~~ 2448 | } | ~ 2449 | for (p = servinfo; p != NULL; p = p->ai_next) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2450 | memcpy(&h, &p->ai_addr, sizeof(struct sockaddr_in *)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2451 | memcpy(ina, &h->sin_addr, sizeof(ina)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2452 | } | ~ 2453 | freeaddrinfo(servinfo); | ~~~~~~~~~~~~~~~~~~~~~~~ 2454 | return 1; | ~~~~~~~~~ 2455 | #else | ~~~~~ 2456 | struct hostent *he; | ~~~~~~~~~~~~~~~~~~~ 2457 | if ((he = gethostbyname(host)) == NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2458 | DBG(("gethostbyname(%s) failed: %s", host, strerror(mg_get_errno()))); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2459 | } else { | ~~~~~~~~ 2460 | memcpy(ina, he->h_addr_list[0], sizeof(*ina)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2461 | return 1; | ~~~~~~~~~ 2462 | } | ~ 2463 | return 0; | ~~~~~~~~~ 2464 | #endif /* MG_ENABLE_GETADDRINFO */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2465 | } | ~ 2466 | | 2467 | int mg_resolve(const char *host, char *buf, size_t n) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2468 | struct in_addr ad; | ~~~~~~~~~~~~~~~~~~ 2469 | return mg_resolve2(host, &ad) ? snprintf(buf, n, "%s", inet_ntoa(ad)) : 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2470 | } | ~ 2471 | #endif /* MG_ENABLE_SYNC_RESOLVER */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2472 | | 2473 | MG_INTERNAL struct mg_connection *mg_create_connection_base( | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2474 | struct mg_mgr *mgr, mg_event_handler_t callback, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2475 | struct mg_add_sock_opts opts) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2476 | struct mg_connection *conn; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2477 | | 2478 | if ((conn = (struct mg_connection *) MG_CALLOC(1, sizeof(*conn))) != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2479 | conn->sock = INVALID_SOCKET; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2480 | conn->handler = callback; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 2481 | conn->mgr = mgr; | ~~~~~~~~~~~~~~~~ 2482 | conn->last_io_time = (time_t) mg_time(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2483 | conn->iface = | ~~~~~~~~~~~~~ 2484 | (opts.iface != NULL ? opts.iface : mgr->ifaces[MG_MAIN_IFACE]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2485 | conn->flags = opts.flags & _MG_ALLOWED_CONNECT_FLAGS_MASK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2486 | conn->user_data = opts.user_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2487 | /* | ~~ 2488 | * SIZE_MAX is defined as a long long constant in | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2489 | * system headers on some platforms and so it | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2490 | * doesn't compile with pedantic ansi flags. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2491 | */ | ~~ 2492 | conn->recv_mbuf_limit = ~0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2493 | } else { | ~~~~~~~~ 2494 | MG_SET_PTRPTR(opts.error_string, "failed to create connection"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2495 | } | ~ 2496 | | 2497 | return conn; | ~~~~~~~~~~~~ 2498 | } | ~ 2499 | | 2500 | MG_INTERNAL struct mg_connection *mg_create_connection( | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2501 | struct mg_mgr *mgr, mg_event_handler_t callback, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2502 | struct mg_add_sock_opts opts) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2503 | struct mg_connection *conn = mg_create_connection_base(mgr, callback, opts); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2504 | | 2505 | if (conn != NULL && !conn->iface->vtable->create_conn(conn)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2506 | MG_FREE(conn); | ~~~~~~~~~~~~~~ 2507 | conn = NULL; | ~~~~~~~~~~~~ 2508 | } | ~ 2509 | if (conn == NULL) { | ~~~~~~~~~~~~~~~~~~~ 2510 | MG_SET_PTRPTR(opts.error_string, "failed to init connection"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2511 | } | ~ 2512 | | 2513 | return conn; | ~~~~~~~~~~~~ 2514 | } | ~ 2515 | | 2516 | /* | ~~ 2517 | * Address format: [PROTO://][HOST]:PORT | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2518 | * | ~ 2519 | * HOST could be IPv4/IPv6 address or a host name. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2520 | * `host` is a destination buffer to hold parsed HOST part. Should be at least | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2521 | * MG_MAX_HOST_LEN bytes long. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2522 | * `proto` is a returned socket type, either SOCK_STREAM or SOCK_DGRAM | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2523 | * | ~ 2524 | * Return: | ~~~~~~~~~ 2525 | * -1 on parse error | ~~~~~~~~~~~~~~~~~~~~~~~ 2526 | * 0 if HOST needs DNS lookup | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2527 | * >0 length of the address string | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2528 | */ | ~~ 2529 | MG_INTERNAL int mg_parse_address(const char *str, union socket_address *sa, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2530 | int *proto, char *host, size_t host_len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2531 | unsigned int a, b, c, d, port = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2532 | int ch, len = 0; | ~~~~~~~~~~~~~~~~ 2533 | #if MG_ENABLE_IPV6 | ~~~~~~~~~~~~~~~~~~ 2534 | char buf[100]; | ~~~~~~~~~~~~~~ 2535 | #endif | ~~~~~~ 2536 | | 2537 | /* | ~~ 2538 | * MacOS needs that. If we do not zero it, subsequent bind() will fail. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2539 | * Also, all-zeroes in the socket address means binding to all addresses | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2540 | * for both IPv4 and IPv6 (INADDR_ANY and IN6ADDR_ANY_INIT). | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2541 | */ | ~~ 2542 | memset(sa, 0, sizeof(*sa)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2543 | sa->sin.sin_family = AF_INET; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2544 | | 2545 | *proto = SOCK_STREAM; | ~~~~~~~~~~~~~~~~~~~~~ 2546 | | 2547 | if (strncmp(str, "udp://", 6) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2548 | str += 6; | ~~~~~~~~~ 2549 | *proto = SOCK_DGRAM; | ~~~~~~~~~~~~~~~~~~~~ 2550 | } else if (strncmp(str, "tcp://", 6) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2551 | str += 6; | ~~~~~~~~~ 2552 | } | ~ 2553 | | 2554 | if (sscanf(str, "%u.%u.%u.%u:%u%n", &a, &b, &c, &d, &port, &len) == 5) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2555 | /* Bind to a specific IPv4 address, e.g. 192.168.1.5:8080 */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2556 | sa->sin.sin_addr.s_addr = | ~~~~~~~~~~~~~~~~~~~~~~~~~ 2557 | htonl(((uint32_t) a << 24) | ((uint32_t) b << 16) | c << 8 | d); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2558 | sa->sin.sin_port = htons((uint16_t) port); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2559 | #if MG_ENABLE_IPV6 | ~~~~~~~~~~~~~~~~~~ 2560 | } else if (sscanf(str, "[%99[^]]]:%u%n", buf, &port, &len) == 2 && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2561 | inet_pton(AF_INET6, buf, &sa->sin6.sin6_addr)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2562 | /* IPv6 address, e.g. [3ffe:2a00:100:7031::1]:8080 */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2563 | sa->sin6.sin6_family = AF_INET6; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2564 | sa->sin.sin_port = htons((uint16_t) port); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2565 | #endif | ~~~~~~ 2566 | #if MG_ENABLE_ASYNC_RESOLVER | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2567 | } else if (strlen(str) < host_len && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2568 | sscanf(str, "%[^ :]:%u%n", host, &port, &len) == 2) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2569 | sa->sin.sin_port = htons((uint16_t) port); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2570 | if (mg_resolve_from_hosts_file(host, sa) != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2571 | /* | ~~ 2572 | * if resolving from hosts file failed and the host | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2573 | * we are trying to resolve is `localhost` - we should | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2574 | * try to resolve it using `gethostbyname` and do not try | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2575 | * to resolve it via DNS server if gethostbyname has failed too | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2576 | */ | ~~ 2577 | if (mg_ncasecmp(host, "localhost", 9) != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2578 | return 0; | ~~~~~~~~~ 2579 | } | ~ 2580 | | 2581 | #if MG_ENABLE_SYNC_RESOLVER | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2582 | if (!mg_resolve2(host, &sa->sin.sin_addr)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2583 | return -1; | ~~~~~~~~~~ 2584 | } | ~ 2585 | #else | ~~~~~ 2586 | return -1; | ~~~~~~~~~~ 2587 | #endif | ~~~~~~ 2588 | } | ~ 2589 | #endif | ~~~~~~ 2590 | } else if (sscanf(str, ":%u%n", &port, &len) == 1 || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2591 | sscanf(str, "%u%n", &port, &len) == 1) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2592 | /* If only port is specified, bind to IPv4, INADDR_ANY */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2593 | sa->sin.sin_port = htons((uint16_t) port); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2594 | } else { | ~~~~~~~~ 2595 | return -1; | ~~~~~~~~~~ 2596 | } | ~ 2597 | | 2598 | /* Required for MG_ENABLE_ASYNC_RESOLVER=0 */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2599 | (void) host; | ~~~~~~~~~~~~ 2600 | (void) host_len; | ~~~~~~~~~~~~~~~~ 2601 | | 2602 | ch = str[len]; /* Character that follows the address */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2603 | return port < 0xffffUL && (ch == '\0' || ch == ',' || isspace(ch)) ? len : -1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2604 | } | ~ 2605 | | 2606 | struct mg_connection *mg_if_accept_new_conn(struct mg_connection *lc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2607 | struct mg_add_sock_opts opts; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2608 | struct mg_connection *nc; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 2609 | memset(&opts, 0, sizeof(opts)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2610 | nc = mg_create_connection(lc->mgr, lc->handler, opts); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2611 | if (nc == NULL) return NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2612 | nc->listener = lc; | ~~~~~~~~~~~~~~~~~~ 2613 | nc->proto_handler = lc->proto_handler; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2614 | nc->user_data = lc->user_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2615 | nc->recv_mbuf_limit = lc->recv_mbuf_limit; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2616 | nc->iface = lc->iface; | ~~~~~~~~~~~~~~~~~~~~~~ 2617 | if (lc->flags & MG_F_SSL) nc->flags |= MG_F_SSL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2618 | mg_add_conn(nc->mgr, nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 2619 | DBG(("%p %p %d %d", lc, nc, nc->sock, (int) nc->flags)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2620 | return nc; | ~~~~~~~~~~ 2621 | } | ~ 2622 | | 2623 | void mg_if_accept_tcp_cb(struct mg_connection *nc, union socket_address *sa, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2624 | size_t sa_len) { | ~~~~~~~~~~~~~~~~ 2625 | (void) sa_len; | ~~~~~~~~~~~~~~ 2626 | nc->sa = *sa; | ~~~~~~~~~~~~~ 2627 | mg_call(nc, NULL, nc->user_data, MG_EV_ACCEPT, &nc->sa); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2628 | } | ~ 2629 | | 2630 | void mg_send(struct mg_connection *nc, const void *buf, int len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2631 | nc->last_io_time = (time_t) mg_time(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2632 | if (nc->flags & MG_F_UDP) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2633 | nc->iface->vtable->udp_send(nc, buf, len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2634 | } else { | ~~~~~~~~ 2635 | nc->iface->vtable->tcp_send(nc, buf, len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2636 | } | ~ 2637 | } | ~ 2638 | | 2639 | void mg_if_sent_cb(struct mg_connection *nc, int num_sent) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2640 | DBG(("%p %d", nc, num_sent)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2641 | #if !defined(NO_LIBC) && MG_ENABLE_HEXDUMP | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2642 | if (nc->mgr && nc->mgr->hexdump_file != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2643 | char *buf = nc->send_mbuf.buf; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2644 | mg_hexdump_connection(nc, nc->mgr->hexdump_file, buf, num_sent, MG_EV_SEND); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2645 | } | ~ 2646 | #endif | ~~~~~~ 2647 | if (num_sent < 0) { | ~~~~~~~~~~~~~~~~~~~ 2648 | nc->flags |= MG_F_CLOSE_IMMEDIATELY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2649 | } else { | ~~~~~~~~ 2650 | mbuf_remove(&nc->send_mbuf, num_sent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2651 | mbuf_trim(&nc->send_mbuf); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 2652 | } | ~ 2653 | mg_call(nc, NULL, nc->user_data, MG_EV_SEND, &num_sent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2654 | } | ~ 2655 | | 2656 | MG_INTERNAL void mg_recv_common(struct mg_connection *nc, void *buf, int len, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2657 | int own) { | ~~~~~~~~~~ 2658 | DBG(("%p %d %u", nc, len, (unsigned int) nc->recv_mbuf.len)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2659 | | 2660 | #if !defined(NO_LIBC) && MG_ENABLE_HEXDUMP | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2661 | if (nc->mgr && nc->mgr->hexdump_file != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2662 | mg_hexdump_connection(nc, nc->mgr->hexdump_file, buf, len, MG_EV_RECV); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2663 | } | ~ 2664 | #endif | ~~~~~~ 2665 | | 2666 | if (nc->flags & MG_F_CLOSE_IMMEDIATELY) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2667 | DBG(("%p discarded %d bytes", nc, len)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2668 | /* | ~~ 2669 | * This connection will not survive next poll. Do not deliver events, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2670 | * send data to /dev/null without acking. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2671 | */ | ~~ 2672 | if (own) { | ~~~~~~~~~~ 2673 | MG_FREE(buf); | ~~~~~~~~~~~~~ 2674 | } | ~ 2675 | return; | ~~~~~~~ 2676 | } | ~ 2677 | nc->last_io_time = (time_t) mg_time(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2678 | if (!own) { | ~~~~~~~~~~~ 2679 | mbuf_append(&nc->recv_mbuf, buf, len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2680 | } else if (nc->recv_mbuf.len == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2681 | /* Adopt buf as recv_mbuf's backing store. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2682 | mbuf_free(&nc->recv_mbuf); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 2683 | nc->recv_mbuf.buf = (char *) buf; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2684 | nc->recv_mbuf.size = nc->recv_mbuf.len = len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2685 | } else { | ~~~~~~~~ 2686 | mbuf_append(&nc->recv_mbuf, buf, len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2687 | MG_FREE(buf); | ~~~~~~~~~~~~~ 2688 | } | ~ 2689 | mg_call(nc, NULL, nc->user_data, MG_EV_RECV, &len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2690 | } | ~ 2691 | | 2692 | void mg_if_recv_tcp_cb(struct mg_connection *nc, void *buf, int len, int own) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2693 | mg_recv_common(nc, buf, len, own); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2694 | } | ~ 2695 | | 2696 | void mg_if_recv_udp_cb(struct mg_connection *nc, void *buf, int len, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2697 | union socket_address *sa, size_t sa_len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2698 | assert(nc->flags & MG_F_UDP); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2699 | DBG(("%p %u", nc, (unsigned int) len)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2700 | if (nc->flags & MG_F_LISTENING) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2701 | struct mg_connection *lc = nc; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2702 | /* | ~~ 2703 | * Do we have an existing connection for this source? | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2704 | * This is very inefficient for long connection lists. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2705 | */ | ~~ 2706 | for (nc = mg_next(lc->mgr, NULL); nc != NULL; nc = mg_next(lc->mgr, nc)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2707 | if (memcmp(&nc->sa.sa, &sa->sa, sa_len) == 0 && nc->listener == lc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2708 | break; | ~~~~~~ 2709 | } | ~ 2710 | } | ~ 2711 | if (nc == NULL) { | ~~~~~~~~~~~~~~~~~ 2712 | struct mg_add_sock_opts opts; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2713 | memset(&opts, 0, sizeof(opts)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2714 | /* Create fake connection w/out sock initialization */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2715 | nc = mg_create_connection_base(lc->mgr, lc->handler, opts); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2716 | if (nc != NULL) { | ~~~~~~~~~~~~~~~~~ 2717 | nc->sock = lc->sock; | ~~~~~~~~~~~~~~~~~~~~ 2718 | nc->listener = lc; | ~~~~~~~~~~~~~~~~~~ 2719 | nc->sa = *sa; | ~~~~~~~~~~~~~ 2720 | nc->proto_handler = lc->proto_handler; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2721 | nc->user_data = lc->user_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2722 | nc->recv_mbuf_limit = lc->recv_mbuf_limit; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2723 | nc->flags = MG_F_UDP; | ~~~~~~~~~~~~~~~~~~~~~ 2724 | /* | ~~ 2725 | * Long-lived UDP "connections" i.e. interactions that involve more | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2726 | * than one request and response are rare, most are transactional: | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2727 | * response is sent and the "connection" is closed. Or - should be. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2728 | * But users (including ourselves) tend to forget about that part, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2729 | * because UDP is connectionless and one does not think about | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2730 | * processing a UDP request as handling a connection that needs to be | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2731 | * closed. Thus, we begin with SEND_AND_CLOSE flag set, which should | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2732 | * be a reasonable default for most use cases, but it is possible to | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2733 | * turn it off the connection should be kept alive after processing. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2734 | */ | ~~ 2735 | nc->flags |= MG_F_SEND_AND_CLOSE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2736 | mg_add_conn(lc->mgr, nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 2737 | mg_call(nc, NULL, nc->user_data, MG_EV_ACCEPT, &nc->sa); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2738 | } else { | ~~~~~~~~ 2739 | DBG(("OOM")); | ~~~~~~~~~~~~~ 2740 | /* No return here, we still need to drop on the floor */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2741 | } | ~ 2742 | } | ~ 2743 | } | ~ 2744 | if (nc != NULL) { | ~~~~~~~~~~~~~~~~~ 2745 | mg_recv_common(nc, buf, len, 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2746 | } else { | ~~~~~~~~ 2747 | /* Drop on the floor. */ | ~~~~~~~~~~~~~~~~~~~~~~~~ 2748 | MG_FREE(buf); | ~~~~~~~~~~~~~ 2749 | } | ~ 2750 | } | ~ 2751 | | 2752 | /* | ~~ 2753 | * Schedules an async connect for a resolved address and proto. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2754 | * Called from two places: `mg_connect_opt()` and from async resolver. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2755 | * When called from the async resolver, it must trigger `MG_EV_CONNECT` event | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2756 | * with a failure flag to indicate connection failure. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2757 | */ | ~~ 2758 | MG_INTERNAL struct mg_connection *mg_do_connect(struct mg_connection *nc, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2759 | int proto, | ~~~~~~~~~~ 2760 | union socket_address *sa) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2761 | DBG(("%p %s://%s:%hu", nc, proto == SOCK_DGRAM ? "udp" : "tcp", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2762 | inet_ntoa(sa->sin.sin_addr), ntohs(sa->sin.sin_port))); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2763 | | 2764 | nc->flags |= MG_F_CONNECTING; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2765 | if (proto == SOCK_DGRAM) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 2766 | nc->iface->vtable->connect_udp(nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2767 | } else { | ~~~~~~~~ 2768 | nc->iface->vtable->connect_tcp(nc, sa); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2769 | } | ~ 2770 | mg_add_conn(nc->mgr, nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 2771 | return nc; | ~~~~~~~~~~ 2772 | } | ~ 2773 | | 2774 | void mg_if_connect_cb(struct mg_connection *nc, int err) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2775 | DBG(("%p connect, err=%d", nc, err)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2776 | nc->flags &= ~MG_F_CONNECTING; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2777 | if (err != 0) { | ~~~~~~~~~~~~~~~ 2778 | nc->flags |= MG_F_CLOSE_IMMEDIATELY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2779 | } | ~ 2780 | mg_call(nc, NULL, nc->user_data, MG_EV_CONNECT, &err); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2781 | } | ~ 2782 | | 2783 | #if MG_ENABLE_ASYNC_RESOLVER | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2784 | /* | ~~ 2785 | * Callback for the async resolver on mg_connect_opt() call. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2786 | * Main task of this function is to trigger MG_EV_CONNECT event with | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2787 | * either failure (and dealloc the connection) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2788 | * or success (and proceed with connect() | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2789 | */ | ~~ 2790 | static void resolve_cb(struct mg_dns_message *msg, void *data, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2791 | enum mg_resolve_err e) { | ~~~~~~~~~~~~~~~~~~~~~~~~ 2792 | struct mg_connection *nc = (struct mg_connection *) data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2793 | int i; | ~~~~~~ 2794 | int failure = -1; | ~~~~~~~~~~~~~~~~~ 2795 | | 2796 | nc->flags &= ~MG_F_RESOLVING; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2797 | if (msg != NULL) { | ~~~~~~~~~~~~~~~~~~ 2798 | /* | ~~ 2799 | * Take the first DNS A answer and run... | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2800 | */ | ~~ 2801 | for (i = 0; i < msg->num_answers; i++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2802 | if (msg->answers[i].rtype == MG_DNS_A_RECORD) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2803 | /* | ~~ 2804 | * Async resolver guarantees that there is at least one answer. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2805 | * TODO(lsm): handle IPv6 answers too | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2806 | */ | ~~ 2807 | mg_dns_parse_record_data(msg, &msg->answers[i], &nc->sa.sin.sin_addr, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2808 | 4); | ~~~ 2809 | mg_do_connect(nc, nc->flags & MG_F_UDP ? SOCK_DGRAM : SOCK_STREAM, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2810 | &nc->sa); | ~~~~~~~~~ 2811 | return; | ~~~~~~~ 2812 | } | ~ 2813 | } | ~ 2814 | } | ~ 2815 | | 2816 | if (e == MG_RESOLVE_TIMEOUT) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2817 | double now = mg_time(); | ~~~~~~~~~~~~~~~~~~~~~~~ 2818 | mg_call(nc, NULL, nc->user_data, MG_EV_TIMER, &now); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2819 | } | ~ 2820 | | 2821 | /* | ~~ 2822 | * If we get there was no MG_DNS_A_RECORD in the answer | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2823 | */ | ~~ 2824 | mg_call(nc, NULL, nc->user_data, MG_EV_CONNECT, &failure); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2825 | mg_call(nc, NULL, nc->user_data, MG_EV_CLOSE, NULL); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2826 | mg_destroy_conn(nc, 1 /* destroy_if */); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2827 | } | ~ 2828 | #endif | ~~~~~~ 2829 | | 2830 | struct mg_connection *mg_connect(struct mg_mgr *mgr, const char *address, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2831 | MG_CB(mg_event_handler_t callback, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2832 | void *user_data)) { | ~~~~~~~~~~~~~~~~~~~ 2833 | struct mg_connect_opts opts; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2834 | memset(&opts, 0, sizeof(opts)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2835 | return mg_connect_opt(mgr, address, MG_CB(callback, user_data), opts); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2836 | } | ~ 2837 | | 2838 | struct mg_connection *mg_connect_opt(struct mg_mgr *mgr, const char *address, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2839 | MG_CB(mg_event_handler_t callback, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2840 | void *user_data), | ~~~~~~~~~~~~~~~~~ 2841 | struct mg_connect_opts opts) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2842 | struct mg_connection *nc = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2843 | int proto, rc; | ~~~~~~~~~~~~~~ 2844 | struct mg_add_sock_opts add_sock_opts; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2845 | char host[MG_MAX_HOST_LEN]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2846 | | 2847 | MG_COPY_COMMON_CONNECTION_OPTIONS(&add_sock_opts, &opts); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2848 | | 2849 | if ((nc = mg_create_connection(mgr, callback, add_sock_opts)) == NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2850 | return NULL; | ~~~~~~~~~~~~ 2851 | } | ~ 2852 | | 2853 | if ((rc = mg_parse_address(address, &nc->sa, &proto, host, sizeof(host))) < | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2854 | 0) { | ~~~~ 2855 | /* Address is malformed */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 2856 | MG_SET_PTRPTR(opts.error_string, "cannot parse address"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2857 | mg_destroy_conn(nc, 1 /* destroy_if */); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2858 | return NULL; | ~~~~~~~~~~~~ 2859 | } | ~ 2860 | | 2861 | nc->flags |= opts.flags & _MG_ALLOWED_CONNECT_FLAGS_MASK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2862 | nc->flags |= (proto == SOCK_DGRAM) ? MG_F_UDP : 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2863 | #if MG_ENABLE_CALLBACK_USERDATA | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2864 | nc->user_data = user_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 2865 | #else | ~~~~~ 2866 | nc->user_data = opts.user_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2867 | #endif | ~~~~~~ 2868 | | 2869 | #if MG_ENABLE_SSL | ~~~~~~~~~~~~~~~~~ 2870 | DBG(("%p %s %s,%s,%s", nc, address, (opts.ssl_cert ? opts.ssl_cert : "-"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2871 | (opts.ssl_key ? opts.ssl_key : "-"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2872 | (opts.ssl_ca_cert ? opts.ssl_ca_cert : "-"))); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2873 | | 2874 | if (opts.ssl_cert != NULL || opts.ssl_ca_cert != NULL || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2875 | opts.ssl_psk_identity != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2876 | const char *err_msg = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2877 | struct mg_ssl_if_conn_params params; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2878 | if (nc->flags & MG_F_UDP) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2879 | MG_SET_PTRPTR(opts.error_string, "SSL for UDP is not supported"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2880 | mg_destroy_conn(nc, 1 /* destroy_if */); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2881 | return NULL; | ~~~~~~~~~~~~ 2882 | } | ~ 2883 | memset(¶ms, 0, sizeof(params)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2884 | params.cert = opts.ssl_cert; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2885 | params.key = opts.ssl_key; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 2886 | params.ca_cert = opts.ssl_ca_cert; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2887 | params.cipher_suites = opts.ssl_cipher_suites; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2888 | params.psk_identity = opts.ssl_psk_identity; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2889 | params.psk_key = opts.ssl_psk_key; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2890 | if (opts.ssl_ca_cert != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2891 | if (opts.ssl_server_name != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2892 | if (strcmp(opts.ssl_server_name, "*") != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2893 | params.server_name = opts.ssl_server_name; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2894 | } | ~ 2895 | } else if (rc == 0) { /* If it's a DNS name, use host. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2896 | params.server_name = host; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 2897 | } | ~ 2898 | } | ~ 2899 | if (mg_ssl_if_conn_init(nc, ¶ms, &err_msg) != MG_SSL_OK) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2900 | MG_SET_PTRPTR(opts.error_string, err_msg); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2901 | mg_destroy_conn(nc, 1 /* destroy_if */); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2902 | return NULL; | ~~~~~~~~~~~~ 2903 | } | ~ 2904 | nc->flags |= MG_F_SSL; | ~~~~~~~~~~~~~~~~~~~~~~ 2905 | } | ~ 2906 | #endif /* MG_ENABLE_SSL */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 2907 | | 2908 | if (rc == 0) { | ~~~~~~~~~~~~~~ 2909 | #if MG_ENABLE_ASYNC_RESOLVER | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2910 | /* | ~~ 2911 | * DNS resolution is required for host. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2912 | * mg_parse_address() fills port in nc->sa, which we pass to resolve_cb() | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2913 | */ | ~~ 2914 | struct mg_connection *dns_conn = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2915 | struct mg_resolve_async_opts o; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2916 | memset(&o, 0, sizeof(o)); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 2917 | o.dns_conn = &dns_conn; | ~~~~~~~~~~~~~~~~~~~~~~~ 2918 | o.nameserver = opts.nameserver; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2919 | if (mg_resolve_async_opt(nc->mgr, host, MG_DNS_A_RECORD, resolve_cb, nc, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2920 | o) != 0) { | ~~~~~~~~~~ 2921 | MG_SET_PTRPTR(opts.error_string, "cannot schedule DNS lookup"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2922 | mg_destroy_conn(nc, 1 /* destroy_if */); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2923 | return NULL; | ~~~~~~~~~~~~ 2924 | } | ~ 2925 | nc->priv_2 = dns_conn; | ~~~~~~~~~~~~~~~~~~~~~~ 2926 | nc->flags |= MG_F_RESOLVING; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2927 | return nc; | ~~~~~~~~~~ 2928 | #else | ~~~~~ 2929 | MG_SET_PTRPTR(opts.error_string, "Resolver is disabled"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2930 | mg_destroy_conn(nc, 1 /* destroy_if */); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2931 | return NULL; | ~~~~~~~~~~~~ 2932 | #endif | ~~~~~~ 2933 | } else { | ~~~~~~~~ 2934 | /* Address is parsed and resolved to IP. proceed with connect() */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2935 | return mg_do_connect(nc, proto, &nc->sa); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2936 | } | ~ 2937 | } | ~ 2938 | | 2939 | struct mg_connection *mg_bind(struct mg_mgr *srv, const char *address, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2940 | MG_CB(mg_event_handler_t event_handler, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2941 | void *user_data)) { | ~~~~~~~~~~~~~~~~~~~ 2942 | struct mg_bind_opts opts; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 2943 | memset(&opts, 0, sizeof(opts)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2944 | return mg_bind_opt(srv, address, MG_CB(event_handler, user_data), opts); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2945 | } | ~ 2946 | | 2947 | struct mg_connection *mg_bind_opt(struct mg_mgr *mgr, const char *address, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2948 | MG_CB(mg_event_handler_t callback, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2949 | void *user_data), | ~~~~~~~~~~~~~~~~~ 2950 | struct mg_bind_opts opts) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2951 | union socket_address sa; | ~~~~~~~~~~~~~~~~~~~~~~~~ 2952 | struct mg_connection *nc = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2953 | int proto, rc; | ~~~~~~~~~~~~~~ 2954 | struct mg_add_sock_opts add_sock_opts; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2955 | char host[MG_MAX_HOST_LEN]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2956 | | 2957 | #if MG_ENABLE_CALLBACK_USERDATA | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2958 | opts.user_data = user_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2959 | #endif | ~~~~~~ 2960 | | 2961 | if (callback == NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~ 2962 | MG_SET_PTRPTR(opts.error_string, "handler is required"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2963 | return NULL; | ~~~~~~~~~~~~ 2964 | } | ~ 2965 | | 2966 | MG_COPY_COMMON_CONNECTION_OPTIONS(&add_sock_opts, &opts); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2967 | | 2968 | if (mg_parse_address(address, &sa, &proto, host, sizeof(host)) <= 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2969 | MG_SET_PTRPTR(opts.error_string, "cannot parse address"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2970 | return NULL; | ~~~~~~~~~~~~ 2971 | } | ~ 2972 | | 2973 | nc = mg_create_connection(mgr, callback, add_sock_opts); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2974 | if (nc == NULL) { | ~~~~~~~~~~~~~~~~~ 2975 | return NULL; | ~~~~~~~~~~~~ 2976 | } | ~ 2977 | | 2978 | nc->sa = sa; | ~~~~~~~~~~~~ 2979 | nc->flags |= MG_F_LISTENING; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2980 | if (proto == SOCK_DGRAM) nc->flags |= MG_F_UDP; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2981 | | 2982 | #if MG_ENABLE_SSL | ~~~~~~~~~~~~~~~~~ 2983 | DBG(("%p %s %s,%s,%s", nc, address, (opts.ssl_cert ? opts.ssl_cert : "-"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2984 | (opts.ssl_key ? opts.ssl_key : "-"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2985 | (opts.ssl_ca_cert ? opts.ssl_ca_cert : "-"))); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2986 | | 2987 | if (opts.ssl_cert != NULL || opts.ssl_ca_cert != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2988 | const char *err_msg = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2989 | struct mg_ssl_if_conn_params params; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2990 | if (nc->flags & MG_F_UDP) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2991 | MG_SET_PTRPTR(opts.error_string, "SSL for UDP is not supported"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2992 | mg_destroy_conn(nc, 1 /* destroy_if */); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2993 | return NULL; | ~~~~~~~~~~~~ 2994 | } | ~ 2995 | memset(¶ms, 0, sizeof(params)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2996 | params.cert = opts.ssl_cert; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2997 | params.key = opts.ssl_key; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 2998 | params.ca_cert = opts.ssl_ca_cert; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2999 | params.cipher_suites = opts.ssl_cipher_suites; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3000 | if (mg_ssl_if_conn_init(nc, ¶ms, &err_msg) != MG_SSL_OK) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3001 | MG_SET_PTRPTR(opts.error_string, err_msg); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3002 | mg_destroy_conn(nc, 1 /* destroy_if */); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3003 | return NULL; | ~~~~~~~~~~~~ 3004 | } | ~ 3005 | nc->flags |= MG_F_SSL; | ~~~~~~~~~~~~~~~~~~~~~~ 3006 | } | ~ 3007 | #endif /* MG_ENABLE_SSL */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 3008 | | 3009 | if (nc->flags & MG_F_UDP) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3010 | rc = nc->iface->vtable->listen_udp(nc, &nc->sa); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3011 | } else { | ~~~~~~~~ 3012 | rc = nc->iface->vtable->listen_tcp(nc, &nc->sa); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3013 | } | ~ 3014 | if (rc != 0) { | ~~~~~~~~~~~~~~ 3015 | DBG(("Failed to open listener: %d", rc)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3016 | MG_SET_PTRPTR(opts.error_string, "failed to open listener"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3017 | mg_destroy_conn(nc, 1 /* destroy_if */); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3018 | return NULL; | ~~~~~~~~~~~~ 3019 | } | ~ 3020 | mg_add_conn(nc->mgr, nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 3021 | | 3022 | return nc; | ~~~~~~~~~~ 3023 | } | ~ 3024 | | 3025 | struct mg_connection *mg_next(struct mg_mgr *s, struct mg_connection *conn) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3026 | return conn == NULL ? s->active_connections : conn->next; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3027 | } | ~ 3028 | | 3029 | #if MG_ENABLE_BROADCAST | ~~~~~~~~~~~~~~~~~~~~~~~ 3030 | void mg_broadcast(struct mg_mgr *mgr, mg_event_handler_t cb, void *data, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3031 | size_t len) { | ~~~~~~~~~~~~~ 3032 | struct ctl_msg ctl_msg; | ~~~~~~~~~~~~~~~~~~~~~~~ 3033 | | 3034 | /* | ~~ 3035 | * Mongoose manager has a socketpair, `struct mg_mgr::ctl`, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3036 | * where `mg_broadcast()` pushes the message. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3037 | * `mg_mgr_poll()` wakes up, reads a message from the socket pair, and calls | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3038 | * specified callback for each connection. Thus the callback function executes | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3039 | * in event manager thread. | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 3040 | */ | ~~ 3041 | if (mgr->ctl[0] != INVALID_SOCKET && data != NULL && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3042 | len < sizeof(ctl_msg.message)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3043 | size_t dummy; | ~~~~~~~~~~~~~ 3044 | | 3045 | ctl_msg.callback = cb; | ~~~~~~~~~~~~~~~~~~~~~~ 3046 | memcpy(ctl_msg.message, data, len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3047 | dummy = MG_SEND_FUNC(mgr->ctl[0], (char *) &ctl_msg, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3048 | offsetof(struct ctl_msg, message) + len, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3049 | dummy = MG_RECV_FUNC(mgr->ctl[0], (char *) &len, 1, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3050 | (void) dummy; /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509 */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3051 | } | ~ 3052 | } | ~ 3053 | #endif /* MG_ENABLE_BROADCAST */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3054 | | 3055 | static int isbyte(int n) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 3056 | return n >= 0 && n <= 255; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 3057 | } | ~ 3058 | | 3059 | static int parse_net(const char *spec, uint32_t *net, uint32_t *mask) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3060 | int n, a, b, c, d, slash = 32, len = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3061 | | 3062 | if ((sscanf(spec, "%d.%d.%d.%d/%d%n", &a, &b, &c, &d, &slash, &n) == 5 || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3063 | sscanf(spec, "%d.%d.%d.%d%n", &a, &b, &c, &d, &n) == 4) && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3064 | isbyte(a) && isbyte(b) && isbyte(c) && isbyte(d) && slash >= 0 && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3065 | slash < 33) { | ~~~~~~~~~~~~~ 3066 | len = n; | ~~~~~~~~ 3067 | *net = | ~~~~~~ 3068 | ((uint32_t) a << 24) | ((uint32_t) b << 16) | ((uint32_t) c << 8) | d; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3069 | *mask = slash ? 0xffffffffU << (32 - slash) : 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3070 | } | ~ 3071 | | 3072 | return len; | ~~~~~~~~~~~ 3073 | } | ~ 3074 | | 3075 | int mg_check_ip_acl(const char *acl, uint32_t remote_ip) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3076 | int allowed, flag; | ~~~~~~~~~~~~~~~~~~ 3077 | uint32_t net, mask; | ~~~~~~~~~~~~~~~~~~~ 3078 | struct mg_str vec; | ~~~~~~~~~~~~~~~~~~ 3079 | | 3080 | /* If any ACL is set, deny by default */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3081 | allowed = (acl == NULL || *acl == '\0') ? '+' : '-'; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3082 | | 3083 | while ((acl = mg_next_comma_list_entry(acl, &vec, NULL)) != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3084 | flag = vec.p[0]; | ~~~~~~~~~~~~~~~~ 3085 | if ((flag != '+' && flag != '-') || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3086 | parse_net(&vec.p[1], &net, &mask) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3087 | return -1; | ~~~~~~~~~~ 3088 | } | ~ 3089 | | 3090 | if (net == (remote_ip & mask)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3091 | allowed = flag; | ~~~~~~~~~~~~~~~ 3092 | } | ~ 3093 | } | ~ 3094 | | 3095 | DBG(("%08x %c", (unsigned int) remote_ip, allowed)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3096 | return allowed == '+'; | ~~~~~~~~~~~~~~~~~~~~~~ 3097 | } | ~ 3098 | | 3099 | /* Move data from one connection to another */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3100 | void mg_forward(struct mg_connection *from, struct mg_connection *to) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3101 | mg_send(to, from->recv_mbuf.buf, from->recv_mbuf.len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3102 | mbuf_remove(&from->recv_mbuf, from->recv_mbuf.len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3103 | } | ~ 3104 | | 3105 | double mg_set_timer(struct mg_connection *c, double timestamp) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3106 | double result = c->ev_timer_time; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3107 | c->ev_timer_time = timestamp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3108 | /* | ~~ 3109 | * If this connection is resolving, it's not in the list of active | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3110 | * connections, so not processed yet. It has a DNS resolver connection | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3111 | * linked to it. Set up a timer for the DNS connection. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3112 | */ | ~~ 3113 | DBG(("%p %p %d -> %lu", c, c->priv_2, (c->flags & MG_F_RESOLVING ? 1 : 0), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3114 | (unsigned long) timestamp)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3115 | if ((c->flags & MG_F_RESOLVING) && c->priv_2 != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3116 | ((struct mg_connection *) c->priv_2)->ev_timer_time = timestamp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3117 | } | ~ 3118 | return result; | ~~~~~~~~~~~~~~ 3119 | } | ~ 3120 | | 3121 | void mg_sock_set(struct mg_connection *nc, sock_t sock) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3122 | if (sock != INVALID_SOCKET) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3123 | nc->iface->vtable->sock_set(nc, sock); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3124 | } | ~ 3125 | } | ~ 3126 | | 3127 | void mg_if_get_conn_addr(struct mg_connection *nc, int remote, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3128 | union socket_address *sa) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3129 | nc->iface->vtable->get_conn_addr(nc, remote, sa); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3130 | } | ~ 3131 | | 3132 | struct mg_connection *mg_add_sock_opt(struct mg_mgr *s, sock_t sock, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3133 | MG_CB(mg_event_handler_t callback, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3134 | void *user_data), | ~~~~~~~~~~~~~~~~~ 3135 | struct mg_add_sock_opts opts) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3136 | #if MG_ENABLE_CALLBACK_USERDATA | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3137 | opts.user_data = user_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3138 | #endif | ~~~~~~ 3139 | | 3140 | struct mg_connection *nc = mg_create_connection_base(s, callback, opts); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3141 | if (nc != NULL) { | ~~~~~~~~~~~~~~~~~ 3142 | mg_sock_set(nc, sock); | ~~~~~~~~~~~~~~~~~~~~~~ 3143 | mg_add_conn(nc->mgr, nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 3144 | } | ~ 3145 | return nc; | ~~~~~~~~~~ 3146 | } | ~ 3147 | | 3148 | struct mg_connection *mg_add_sock(struct mg_mgr *s, sock_t sock, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3149 | MG_CB(mg_event_handler_t callback, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3150 | void *user_data)) { | ~~~~~~~~~~~~~~~~~~~ 3151 | struct mg_add_sock_opts opts; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3152 | memset(&opts, 0, sizeof(opts)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3153 | return mg_add_sock_opt(s, sock, MG_CB(callback, user_data), opts); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3154 | } | ~ 3155 | | 3156 | double mg_time(void) { | ~~~~~~~~~~~~~~~~~~~~~~ 3157 | return cs_time(); | ~~~~~~~~~~~~~~~~~ 3158 | } | ~ 3159 | #ifdef MG_MODULE_LINES | ~~~~~~~~~~~~~~~~~~~~~~ 3160 | #line 1 "mongoose/src/mg_net_if_socket.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3161 | #endif | ~~~~~~ 3162 | /* | ~~ 3163 | * Copyright (c) 2014-2016 Cesanta Software Limited | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3164 | * All rights reserved | ~~~~~~~~~~~~~~~~~~~~~ 3165 | */ | ~~ 3166 | | 3167 | #ifndef CS_MONGOOSE_SRC_NET_IF_SOCKET_H_ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3168 | #define CS_MONGOOSE_SRC_NET_IF_SOCKET_H_ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3169 | | 3170 | /* Amalgamated: #include "mg_net_if.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3171 | | 3172 | #ifdef __cplusplus | ~~~~~~~~~~~~~~~~~~ 3173 | extern "C" { | ~~~~~~~~~~~~ 3174 | #endif /* __cplusplus */ | ~~~~~~~~~~~~~~~~~~~~~~~~ 3175 | | 3176 | #ifndef MG_ENABLE_NET_IF_SOCKET | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3177 | #define MG_ENABLE_NET_IF_SOCKET MG_NET_IF == MG_NET_IF_SOCKET | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3178 | #endif | ~~~~~~ 3179 | | 3180 | extern const struct mg_iface_vtable mg_socket_iface_vtable; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3181 | | 3182 | #ifdef __cplusplus | ~~~~~~~~~~~~~~~~~~ 3183 | } | ~ 3184 | #endif /* __cplusplus */ | ~~~~~~~~~~~~~~~~~~~~~~~~ 3185 | | 3186 | #endif /* CS_MONGOOSE_SRC_NET_IF_SOCKET_H_ */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3187 | #ifdef MG_MODULE_LINES | ~~~~~~~~~~~~~~~~~~~~~~ 3188 | #line 1 "mongoose/src/mg_net_if_socks.h" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3189 | #endif | ~~~~~~ 3190 | /* | ~~ 3191 | * Copyright (c) 2014-2017 Cesanta Software Limited | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3192 | * All rights reserved | ~~~~~~~~~~~~~~~~~~~~~ 3193 | */ | ~~ 3194 | | 3195 | #ifndef CS_MONGOOSE_SRC_NET_IF_SOCKS_H_ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3196 | #define CS_MONGOOSE_SRC_NET_IF_SOCKS_H_ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3197 | | 3198 | #if MG_ENABLE_SOCKS | ~~~~~~~~~~~~~~~~~~~ 3199 | /* Amalgamated: #include "mg_net_if.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3200 | | 3201 | #ifdef __cplusplus | ~~~~~~~~~~~~~~~~~~ 3202 | extern "C" { | ~~~~~~~~~~~~ 3203 | #endif /* __cplusplus */ | ~~~~~~~~~~~~~~~~~~~~~~~~ 3204 | | 3205 | extern const struct mg_iface_vtable mg_socks_iface_vtable; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3206 | | 3207 | #ifdef __cplusplus | ~~~~~~~~~~~~~~~~~~ 3208 | } | ~ 3209 | #endif /* __cplusplus */ | ~~~~~~~~~~~~~~~~~~~~~~~~ 3210 | #endif /* MG_ENABLE_SOCKS */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3211 | #endif /* CS_MONGOOSE_SRC_NET_IF_SOCKS_H_ */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3212 | #ifdef MG_MODULE_LINES | ~~~~~~~~~~~~~~~~~~~~~~ 3213 | #line 1 "mongoose/src/mg_net_if.c" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3214 | #endif | ~~~~~~ 3215 | /* Amalgamated: #include "mg_net_if.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3216 | /* Amalgamated: #include "mg_internal.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3217 | /* Amalgamated: #include "mg_net_if_socket.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3218 | | 3219 | extern const struct mg_iface_vtable mg_default_iface_vtable; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3220 | | 3221 | const struct mg_iface_vtable *mg_ifaces[] = { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3222 | &mg_default_iface_vtable, | ~~~~~~~~~~~~~~~~~~~~~~~~~ 3223 | }; | ~~ 3224 | | 3225 | int mg_num_ifaces = (int) (sizeof(mg_ifaces) / sizeof(mg_ifaces[0])); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3226 | | 3227 | struct mg_iface *mg_if_create_iface(const struct mg_iface_vtable *vtable, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3228 | struct mg_mgr *mgr) { | ~~~~~~~~~~~~~~~~~~~~~ 3229 | struct mg_iface *iface = (struct mg_iface *) MG_CALLOC(1, sizeof(*iface)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3230 | iface->mgr = mgr; | ~~~~~~~~~~~~~~~~~ 3231 | iface->data = NULL; | ~~~~~~~~~~~~~~~~~~~ 3232 | iface->vtable = vtable; | ~~~~~~~~~~~~~~~~~~~~~~~ 3233 | return iface; | ~~~~~~~~~~~~~ 3234 | } | ~ 3235 | | 3236 | struct mg_iface *mg_find_iface(struct mg_mgr *mgr, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3237 | const struct mg_iface_vtable *vtable, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3238 | struct mg_iface *from) { | ~~~~~~~~~~~~~~~~~~~~~~~~ 3239 | int i = 0; | ~~~~~~~~~~ 3240 | if (from != NULL) { | ~~~~~~~~~~~~~~~~~~~ 3241 | for (i = 0; i < mgr->num_ifaces; i++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3242 | if (mgr->ifaces[i] == from) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3243 | i++; | ~~~~ 3244 | break; | ~~~~~~ 3245 | } | ~ 3246 | } | ~ 3247 | } | ~ 3248 | | 3249 | for (; i < mgr->num_ifaces; i++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3250 | if (mgr->ifaces[i]->vtable == vtable) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3251 | return mgr->ifaces[i]; | ~~~~~~~~~~~~~~~~~~~~~~ 3252 | } | ~ 3253 | } | ~ 3254 | return NULL; | ~~~~~~~~~~~~ 3255 | } | ~ 3256 | #ifdef MG_MODULE_LINES | ~~~~~~~~~~~~~~~~~~~~~~ 3257 | #line 1 "mongoose/src/mg_net_if_socket.c" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3258 | #endif | ~~~~~~ 3259 | /* | ~~ 3260 | * Copyright (c) 2014-2016 Cesanta Software Limited | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3261 | * All rights reserved | ~~~~~~~~~~~~~~~~~~~~~ 3262 | */ | ~~ 3263 | | 3264 | #if MG_ENABLE_NET_IF_SOCKET | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3265 | | 3266 | /* Amalgamated: #include "mg_net_if_socket.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3267 | /* Amalgamated: #include "mg_internal.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3268 | /* Amalgamated: #include "mg_util.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3269 | | 3270 | #define MG_TCP_RECV_BUFFER_SIZE 1024 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3271 | #define MG_UDP_RECV_BUFFER_SIZE 1500 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3272 | | 3273 | static sock_t mg_open_listening_socket(union socket_address *sa, int type, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3274 | int proto); | ~~~~~~~~~~~ 3275 | #if MG_ENABLE_SSL | ~~~~~~~~~~~~~~~~~ 3276 | static void mg_ssl_begin(struct mg_connection *nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3277 | #endif | ~~~~~~ 3278 | | 3279 | void mg_set_non_blocking_mode(sock_t sock) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3280 | #ifdef _WIN32 | ~~~~~~~~~~~~~ 3281 | unsigned long on = 1; | ~~~~~~~~~~~~~~~~~~~~~ 3282 | ioctlsocket(sock, FIONBIO, &on); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3283 | #else | ~~~~~ 3284 | int flags = fcntl(sock, F_GETFL, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3285 | fcntl(sock, F_SETFL, flags | O_NONBLOCK); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3286 | #endif | ~~~~~~ 3287 | } | ~ 3288 | | 3289 | static int mg_is_error(void) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3290 | int err = mg_get_errno(); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 3291 | return err != EINPROGRESS && err != EWOULDBLOCK | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3292 | #ifndef WINCE | ~~~~~~~~~~~~~ 3293 | && err != EAGAIN && err != EINTR | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3294 | #endif | ~~~~~~ 3295 | #ifdef _WIN32 | ~~~~~~~~~~~~~ 3296 | && WSAGetLastError() != WSAEINTR && WSAGetLastError() != WSAEWOULDBLOCK | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3297 | #endif | ~~~~~~ 3298 | ; | ~ 3299 | } | ~ 3300 | | 3301 | void mg_socket_if_connect_tcp(struct mg_connection *nc, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3302 | const union socket_address *sa) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3303 | int rc, proto = 0; | ~~~~~~~~~~~~~~~~~~ 3304 | nc->sock = socket(AF_INET, SOCK_STREAM, proto); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3305 | if (nc->sock == INVALID_SOCKET) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3306 | nc->err = mg_get_errno() ? mg_get_errno() : 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3307 | return; | ~~~~~~~ 3308 | } | ~ 3309 | #if !defined(MG_ESP8266) | ~~~~~~~~~~~~~~~~~~~~~~~~ 3310 | mg_set_non_blocking_mode(nc->sock); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3311 | #endif | ~~~~~~ 3312 | rc = connect(nc->sock, &sa->sa, sizeof(sa->sin)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3313 | nc->err = rc < 0 && mg_is_error() ? mg_get_errno() : 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3314 | DBG(("%p sock %d rc %d errno %d err %d", nc, nc->sock, rc, mg_get_errno(), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3315 | nc->err)); | ~~~~~~~~~~ 3316 | } | ~ 3317 | | 3318 | void mg_socket_if_connect_udp(struct mg_connection *nc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3319 | nc->sock = socket(AF_INET, SOCK_DGRAM, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3320 | if (nc->sock == INVALID_SOCKET) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3321 | nc->err = mg_get_errno() ? mg_get_errno() : 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3322 | return; | ~~~~~~~ 3323 | } | ~ 3324 | if (nc->flags & MG_F_ENABLE_BROADCAST) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3325 | int optval = 1; | ~~~~~~~~~~~~~~~ 3326 | if (setsockopt(nc->sock, SOL_SOCKET, SO_BROADCAST, (const char *) &optval, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3327 | sizeof(optval)) < 0) { | ~~~~~~~~~~~~~~~~~~~~~~ 3328 | nc->err = mg_get_errno() ? mg_get_errno() : 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3329 | return; | ~~~~~~~ 3330 | } | ~ 3331 | } | ~ 3332 | nc->err = 0; | ~~~~~~~~~~~~ 3333 | } | ~ 3334 | | 3335 | int mg_socket_if_listen_tcp(struct mg_connection *nc, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3336 | union socket_address *sa) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3337 | int proto = 0; | ~~~~~~~~~~~~~~ 3338 | sock_t sock = mg_open_listening_socket(sa, SOCK_STREAM, proto); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3339 | if (sock == INVALID_SOCKET) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3340 | return (mg_get_errno() ? mg_get_errno() : 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3341 | } | ~ 3342 | mg_sock_set(nc, sock); | ~~~~~~~~~~~~~~~~~~~~~~ 3343 | return 0; | ~~~~~~~~~ 3344 | } | ~ 3345 | | 3346 | int mg_socket_if_listen_udp(struct mg_connection *nc, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3347 | union socket_address *sa) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3348 | sock_t sock = mg_open_listening_socket(sa, SOCK_DGRAM, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3349 | if (sock == INVALID_SOCKET) return (mg_get_errno() ? mg_get_errno() : 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3350 | mg_sock_set(nc, sock); | ~~~~~~~~~~~~~~~~~~~~~~ 3351 | return 0; | ~~~~~~~~~ 3352 | } | ~ 3353 | | 3354 | void mg_socket_if_tcp_send(struct mg_connection *nc, const void *buf, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3355 | size_t len) { | ~~~~~~~~~~~~~ 3356 | mbuf_append(&nc->send_mbuf, buf, len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3357 | } | ~ 3358 | | 3359 | void mg_socket_if_udp_send(struct mg_connection *nc, const void *buf, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3360 | size_t len) { | ~~~~~~~~~~~~~ 3361 | mbuf_append(&nc->send_mbuf, buf, len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3362 | } | ~ 3363 | | 3364 | void mg_socket_if_recved(struct mg_connection *nc, size_t len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3365 | (void) nc; | ~~~~~~~~~~ 3366 | (void) len; | ~~~~~~~~~~~ 3367 | } | ~ 3368 | | 3369 | int mg_socket_if_create_conn(struct mg_connection *nc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3370 | (void) nc; | ~~~~~~~~~~ 3371 | return 1; | ~~~~~~~~~ 3372 | } | ~ 3373 | | 3374 | void mg_socket_if_destroy_conn(struct mg_connection *nc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3375 | if (nc->sock == INVALID_SOCKET) return; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3376 | if (!(nc->flags & MG_F_UDP)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3377 | closesocket(nc->sock); | ~~~~~~~~~~~~~~~~~~~~~~ 3378 | } else { | ~~~~~~~~ 3379 | /* Only close outgoing UDP sockets or listeners. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3380 | if (nc->listener == NULL) closesocket(nc->sock); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3381 | } | ~ 3382 | nc->sock = INVALID_SOCKET; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 3383 | } | ~ 3384 | | 3385 | static int mg_accept_conn(struct mg_connection *lc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3386 | struct mg_connection *nc; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 3387 | union socket_address sa; | ~~~~~~~~~~~~~~~~~~~~~~~~ 3388 | socklen_t sa_len = sizeof(sa); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3389 | /* NOTE(lsm): on Windows, sock is always > FD_SETSIZE */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3390 | sock_t sock = accept(lc->sock, &sa.sa, &sa_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3391 | if (sock == INVALID_SOCKET) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3392 | if (mg_is_error()) DBG(("%p: failed to accept: %d", lc, mg_get_errno())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3393 | return 0; | ~~~~~~~~~ 3394 | } | ~ 3395 | nc = mg_if_accept_new_conn(lc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3396 | if (nc == NULL) { | ~~~~~~~~~~~~~~~~~ 3397 | closesocket(sock); | ~~~~~~~~~~~~~~~~~~ 3398 | return 0; | ~~~~~~~~~ 3399 | } | ~ 3400 | DBG(("%p conn from %s:%d", nc, inet_ntoa(sa.sin.sin_addr), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3401 | ntohs(sa.sin.sin_port))); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 3402 | mg_sock_set(nc, sock); | ~~~~~~~~~~~~~~~~~~~~~~ 3403 | #if MG_ENABLE_SSL | ~~~~~~~~~~~~~~~~~ 3404 | if (lc->flags & MG_F_SSL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3405 | if (mg_ssl_if_conn_accept(nc, lc) != MG_SSL_OK) mg_close_conn(nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3406 | } else | ~~~~~~ 3407 | #endif | ~~~~~~ 3408 | { | ~ 3409 | mg_if_accept_tcp_cb(nc, &sa, sa_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3410 | } | ~ 3411 | return 1; | ~~~~~~~~~ 3412 | } | ~ 3413 | | 3414 | /* 'sa' must be an initialized address to bind to */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3415 | static sock_t mg_open_listening_socket(union socket_address *sa, int type, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3416 | int proto) { | ~~~~~~~~~~~~ 3417 | socklen_t sa_len = | ~~~~~~~~~~~~~~~~~~ 3418 | (sa->sa.sa_family == AF_INET) ? sizeof(sa->sin) : sizeof(sa->sin6); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3419 | sock_t sock = INVALID_SOCKET; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3420 | #if !MG_LWIP | ~~~~~~~~~~~~ 3421 | int on = 1; | ~~~~~~~~~~~ 3422 | #endif | ~~~~~~ 3423 | | 3424 | if ((sock = socket(sa->sa.sa_family, type, proto)) != INVALID_SOCKET && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3425 | #if !MG_LWIP /* LWIP doesn't support either */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3426 | #if defined(_WIN32) && defined(SO_EXCLUSIVEADDRUSE) && !defined(WINCE) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3427 | /* "Using SO_REUSEADDR and SO_EXCLUSIVEADDRUSE" http://goo.gl/RmrFTm */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3428 | !setsockopt(sock, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (void *) &on, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3429 | sizeof(on)) && | ~~~~~~~~~~~~~~ 3430 | #endif | ~~~~~~ 3431 | | 3432 | #if !defined(_WIN32) || !defined(SO_EXCLUSIVEADDRUSE) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3433 | /* | ~~ 3434 | * SO_RESUSEADDR is not enabled on Windows because the semantics of | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3435 | * SO_REUSEADDR on UNIX and Windows is different. On Windows, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3436 | * SO_REUSEADDR allows to bind a socket to a port without error even if | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3437 | * the port is already open by another program. This is not the behavior | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3438 | * SO_REUSEADDR was designed for, and leads to hard-to-track failure | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3439 | * scenarios. Therefore, SO_REUSEADDR was disabled on Windows unless | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3440 | * SO_EXCLUSIVEADDRUSE is supported and set on a socket. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3441 | */ | ~~ 3442 | !setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *) &on, sizeof(on)) && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3443 | #endif | ~~~~~~ 3444 | #endif /* !MG_LWIP */ | ~~~~~~~~~~~~~~~~~~~~~ 3445 | | 3446 | !bind(sock, &sa->sa, sa_len) && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3447 | (type == SOCK_DGRAM || listen(sock, SOMAXCONN) == 0)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3448 | #if !MG_LWIP | ~~~~~~~~~~~~ 3449 | mg_set_non_blocking_mode(sock); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3450 | /* In case port was set to 0, get the real port number */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3451 | (void) getsockname(sock, &sa->sa, &sa_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3452 | #endif | ~~~~~~ 3453 | } else if (sock != INVALID_SOCKET) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3454 | closesocket(sock); | ~~~~~~~~~~~~~~~~~~ 3455 | sock = INVALID_SOCKET; | ~~~~~~~~~~~~~~~~~~~~~~ 3456 | } | ~ 3457 | | 3458 | return sock; | ~~~~~~~~~~~~ 3459 | } | ~ 3460 | | 3461 | static void mg_write_to_socket(struct mg_connection *nc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3462 | struct mbuf *io = &nc->send_mbuf; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3463 | int n = 0; | ~~~~~~~~~~ 3464 | | 3465 | #if MG_LWIP | ~~~~~~~~~~~ 3466 | /* With LWIP we don't know if the socket is ready */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3467 | if (io->len == 0) return; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 3468 | #endif | ~~~~~~ 3469 | | 3470 | assert(io->len > 0); | ~~~~~~~~~~~~~~~~~~~~ 3471 | | 3472 | if (nc->flags & MG_F_UDP) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3473 | int n = | ~~~~~~~ 3474 | sendto(nc->sock, io->buf, io->len, 0, &nc->sa.sa, sizeof(nc->sa.sin)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3475 | DBG(("%p %d %d %d %s:%hu", nc, nc->sock, n, mg_get_errno(), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3476 | inet_ntoa(nc->sa.sin.sin_addr), ntohs(nc->sa.sin.sin_port))); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3477 | mg_if_sent_cb(nc, n); | ~~~~~~~~~~~~~~~~~~~~~ 3478 | return; | ~~~~~~~ 3479 | } | ~ 3480 | | 3481 | #if MG_ENABLE_SSL | ~~~~~~~~~~~~~~~~~ 3482 | if (nc->flags & MG_F_SSL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3483 | if (nc->flags & MG_F_SSL_HANDSHAKE_DONE) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3484 | n = mg_ssl_if_write(nc, io->buf, io->len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3485 | DBG(("%p %d bytes -> %d (SSL)", nc, n, nc->sock)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3486 | if (n < 0) { | ~~~~~~~~~~~~ 3487 | if (n != MG_SSL_WANT_READ && n != MG_SSL_WANT_WRITE) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3488 | nc->flags |= MG_F_CLOSE_IMMEDIATELY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3489 | } | ~ 3490 | return; | ~~~~~~~ 3491 | } else { | ~~~~~~~~ 3492 | /* Successful SSL operation, clear off SSL wait flags */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3493 | nc->flags &= ~(MG_F_WANT_READ | MG_F_WANT_WRITE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3494 | } | ~ 3495 | } else { | ~~~~~~~~ 3496 | mg_ssl_begin(nc); | ~~~~~~~~~~~~~~~~~ 3497 | return; | ~~~~~~~ 3498 | } | ~ 3499 | } else | ~~~~~~ 3500 | #endif | ~~~~~~ 3501 | { | ~ 3502 | n = (int) MG_SEND_FUNC(nc->sock, io->buf, io->len, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3503 | DBG(("%p %d bytes -> %d", nc, n, nc->sock)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3504 | } | ~ 3505 | | 3506 | mg_if_sent_cb(nc, n); | ~~~~~~~~~~~~~~~~~~~~~ 3507 | } | ~ 3508 | | 3509 | MG_INTERNAL size_t recv_avail_size(struct mg_connection *conn, size_t max) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3510 | size_t avail; | ~~~~~~~~~~~~~ 3511 | if (conn->recv_mbuf_limit < conn->recv_mbuf.len) return 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3512 | avail = conn->recv_mbuf_limit - conn->recv_mbuf.len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3513 | return avail > max ? max : avail; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3514 | } | ~ 3515 | | 3516 | static void mg_handle_tcp_read(struct mg_connection *conn) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3517 | int n = 0; | ~~~~~~~~~~ 3518 | char *buf = (char *) MG_MALLOC(MG_TCP_RECV_BUFFER_SIZE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3519 | | 3520 | if (buf == NULL) { | ~~~~~~~~~~~~~~~~~~ 3521 | DBG(("OOM")); | ~~~~~~~~~~~~~ 3522 | return; | ~~~~~~~ 3523 | } | ~ 3524 | | 3525 | #if MG_ENABLE_SSL | ~~~~~~~~~~~~~~~~~ 3526 | if (conn->flags & MG_F_SSL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3527 | if (conn->flags & MG_F_SSL_HANDSHAKE_DONE) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3528 | /* SSL library may have more bytes ready to read than we ask to read. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3529 | * Therefore, read in a loop until we read everything. Without the loop, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3530 | * we skip to the next select() cycle which can just timeout. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3531 | while ((n = mg_ssl_if_read(conn, buf, MG_TCP_RECV_BUFFER_SIZE)) > 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3532 | DBG(("%p %d bytes <- %d (SSL)", conn, n, conn->sock)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3533 | mg_if_recv_tcp_cb(conn, buf, n, 1 /* own */); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3534 | buf = NULL; | ~~~~~~~~~~~ 3535 | if (conn->flags & MG_F_CLOSE_IMMEDIATELY) break; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3536 | /* buf has been freed, we need a new one. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3537 | buf = (char *) MG_MALLOC(MG_TCP_RECV_BUFFER_SIZE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3538 | if (buf == NULL) break; | ~~~~~~~~~~~~~~~~~~~~~~~ 3539 | } | ~ 3540 | MG_FREE(buf); | ~~~~~~~~~~~~~ 3541 | if (n < 0 && n != MG_SSL_WANT_READ) conn->flags |= MG_F_CLOSE_IMMEDIATELY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3542 | } else { | ~~~~~~~~ 3543 | MG_FREE(buf); | ~~~~~~~~~~~~~ 3544 | mg_ssl_begin(conn); | ~~~~~~~~~~~~~~~~~~~ 3545 | return; | ~~~~~~~ 3546 | } | ~ 3547 | } else | ~~~~~~ 3548 | #endif | ~~~~~~ 3549 | { | ~ 3550 | n = (int) MG_RECV_FUNC(conn->sock, buf, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3551 | recv_avail_size(conn, MG_TCP_RECV_BUFFER_SIZE), 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3552 | DBG(("%p %d bytes (PLAIN) <- %d", conn, n, conn->sock)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3553 | if (n > 0) { | ~~~~~~~~~~~~ 3554 | mg_if_recv_tcp_cb(conn, buf, n, 1 /* own */); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3555 | } else { | ~~~~~~~~ 3556 | MG_FREE(buf); | ~~~~~~~~~~~~~ 3557 | } | ~ 3558 | if (n == 0) { | ~~~~~~~~~~~~~ 3559 | /* Orderly shutdown of the socket, try flushing output. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3560 | conn->flags |= MG_F_SEND_AND_CLOSE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3561 | } else if (n < 0 && mg_is_error()) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3562 | conn->flags |= MG_F_CLOSE_IMMEDIATELY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3563 | } | ~ 3564 | } | ~ 3565 | } | ~ 3566 | | 3567 | static int mg_recvfrom(struct mg_connection *nc, union socket_address *sa, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3568 | socklen_t *sa_len, char **buf) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3569 | int n; | ~~~~~~ 3570 | *buf = (char *) MG_MALLOC(MG_UDP_RECV_BUFFER_SIZE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3571 | if (*buf == NULL) { | ~~~~~~~~~~~~~~~~~~~ 3572 | DBG(("Out of memory")); | ~~~~~~~~~~~~~~~~~~~~~~~ 3573 | return -ENOMEM; | ~~~~~~~~~~~~~~~ 3574 | } | ~ 3575 | n = recvfrom(nc->sock, *buf, MG_UDP_RECV_BUFFER_SIZE, 0, &sa->sa, sa_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3576 | if (n <= 0) { | ~~~~~~~~~~~~~ 3577 | DBG(("%p recvfrom: %s", nc, strerror(mg_get_errno()))); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3578 | MG_FREE(*buf); | ~~~~~~~~~~~~~~ 3579 | } | ~ 3580 | return n; | ~~~~~~~~~ 3581 | } | ~ 3582 | | 3583 | static void mg_handle_udp_read(struct mg_connection *nc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3584 | char *buf = NULL; | ~~~~~~~~~~~~~~~~~ 3585 | union socket_address sa; | ~~~~~~~~~~~~~~~~~~~~~~~~ 3586 | socklen_t sa_len = sizeof(sa); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3587 | int n = mg_recvfrom(nc, &sa, &sa_len, &buf); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3588 | DBG(("%p %d bytes from %s:%d", nc, n, inet_ntoa(nc->sa.sin.sin_addr), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3589 | ntohs(nc->sa.sin.sin_port))); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3590 | mg_if_recv_udp_cb(nc, buf, n, &sa, sa_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3591 | } | ~ 3592 | | 3593 | #if MG_ENABLE_SSL | ~~~~~~~~~~~~~~~~~ 3594 | static void mg_ssl_begin(struct mg_connection *nc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3595 | int server_side = (nc->listener != NULL); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3596 | enum mg_ssl_if_result res = mg_ssl_if_handshake(nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3597 | DBG(("%p %d res %d", nc, server_side, res)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3598 | | 3599 | if (res == MG_SSL_OK) { | ~~~~~~~~~~~~~~~~~~~~~~~ 3600 | nc->flags |= MG_F_SSL_HANDSHAKE_DONE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3601 | nc->flags &= ~(MG_F_WANT_READ | MG_F_WANT_WRITE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3602 | | 3603 | if (server_side) { | ~~~~~~~~~~~~~~~~~~ 3604 | union socket_address sa; | ~~~~~~~~~~~~~~~~~~~~~~~~ 3605 | socklen_t sa_len = sizeof(sa); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3606 | (void) getpeername(nc->sock, &sa.sa, &sa_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3607 | mg_if_accept_tcp_cb(nc, &sa, sa_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3608 | } else { | ~~~~~~~~ 3609 | mg_if_connect_cb(nc, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~ 3610 | } | ~ 3611 | } else if (res != MG_SSL_WANT_READ && res != MG_SSL_WANT_WRITE) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3612 | if (!server_side) { | ~~~~~~~~~~~~~~~~~~~ 3613 | mg_if_connect_cb(nc, res); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 3614 | } | ~ 3615 | nc->flags |= MG_F_CLOSE_IMMEDIATELY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3616 | } | ~ 3617 | } | ~ 3618 | #endif /* MG_ENABLE_SSL */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 3619 | | 3620 | #define _MG_F_FD_CAN_READ 1 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3621 | #define _MG_F_FD_CAN_WRITE 1 << 1 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3622 | #define _MG_F_FD_ERROR 1 << 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3623 | | 3624 | void mg_mgr_handle_conn(struct mg_connection *nc, int fd_flags, double now) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3625 | int worth_logging = | ~~~~~~~~~~~~~~~~~~~ 3626 | fd_flags != 0 || (nc->flags & (MG_F_WANT_READ | MG_F_WANT_WRITE)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3627 | if (worth_logging) { | ~~~~~~~~~~~~~~~~~~~~ 3628 | DBG(("%p fd=%d fd_flags=%d nc_flags=%lu rmbl=%d smbl=%d", nc, nc->sock, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3629 | fd_flags, nc->flags, (int) nc->recv_mbuf.len, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3630 | (int) nc->send_mbuf.len)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 3631 | } | ~ 3632 | | 3633 | if (nc->flags & MG_F_CONNECTING) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3634 | if (fd_flags != 0) { | ~~~~~~~~~~~~~~~~~~~~ 3635 | int err = 0; | ~~~~~~~~~~~~ 3636 | #if !defined(MG_ESP8266) | ~~~~~~~~~~~~~~~~~~~~~~~~ 3637 | if (!(nc->flags & MG_F_UDP)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3638 | socklen_t len = sizeof(err); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3639 | int ret = | ~~~~~~~~~ 3640 | getsockopt(nc->sock, SOL_SOCKET, SO_ERROR, (char *) &err, &len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3641 | if (ret != 0) { | ~~~~~~~~~~~~~~~ 3642 | err = 1; | ~~~~~~~~ 3643 | } else if (err == EAGAIN || err == EWOULDBLOCK) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3644 | err = 0; | ~~~~~~~~ 3645 | } | ~ 3646 | } | ~ 3647 | #else | ~~~~~ 3648 | /* | ~~ 3649 | * On ESP8266 we use blocking connect. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3650 | */ | ~~ 3651 | err = nc->err; | ~~~~~~~~~~~~~~ 3652 | #endif | ~~~~~~ 3653 | #if MG_ENABLE_SSL | ~~~~~~~~~~~~~~~~~ 3654 | if ((nc->flags & MG_F_SSL) && err == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3655 | mg_ssl_begin(nc); | ~~~~~~~~~~~~~~~~~ 3656 | } else { | ~~~~~~~~ 3657 | mg_if_connect_cb(nc, err); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 3658 | } | ~ 3659 | #else | ~~~~~ 3660 | mg_if_connect_cb(nc, err); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 3661 | #endif | ~~~~~~ 3662 | } else if (nc->err != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 3663 | mg_if_connect_cb(nc, nc->err); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3664 | } | ~ 3665 | } | ~ 3666 | | 3667 | if (fd_flags & _MG_F_FD_CAN_READ) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3668 | if (nc->flags & MG_F_UDP) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3669 | mg_handle_udp_read(nc); | ~~~~~~~~~~~~~~~~~~~~~~~ 3670 | } else { | ~~~~~~~~ 3671 | if (nc->flags & MG_F_LISTENING) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3672 | /* | ~~ 3673 | * We're not looping here, and accepting just one connection at | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3674 | * a time. The reason is that eCos does not respect non-blocking | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3675 | * flag on a listening socket and hangs in a loop. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3676 | */ | ~~ 3677 | mg_accept_conn(nc); | ~~~~~~~~~~~~~~~~~~~ 3678 | } else { | ~~~~~~~~ 3679 | mg_handle_tcp_read(nc); | ~~~~~~~~~~~~~~~~~~~~~~~ 3680 | } | ~ 3681 | } | ~ 3682 | } | ~ 3683 | | 3684 | if (!(nc->flags & MG_F_CLOSE_IMMEDIATELY)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3685 | if ((fd_flags & _MG_F_FD_CAN_WRITE) && nc->send_mbuf.len > 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3686 | mg_write_to_socket(nc); | ~~~~~~~~~~~~~~~~~~~~~~~ 3687 | } | ~ 3688 | mg_if_poll(nc, (time_t) now); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3689 | mg_if_timer(nc, now); | ~~~~~~~~~~~~~~~~~~~~~ 3690 | } | ~ 3691 | | 3692 | if (worth_logging) { | ~~~~~~~~~~~~~~~~~~~~ 3693 | DBG(("%p after fd=%d nc_flags=%lu rmbl=%d smbl=%d", nc, nc->sock, nc->flags, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3694 | (int) nc->recv_mbuf.len, (int) nc->send_mbuf.len)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3695 | } | ~ 3696 | } | ~ 3697 | | 3698 | #if MG_ENABLE_BROADCAST | ~~~~~~~~~~~~~~~~~~~~~~~ 3699 | static void mg_mgr_handle_ctl_sock(struct mg_mgr *mgr) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3700 | struct ctl_msg ctl_msg; | ~~~~~~~~~~~~~~~~~~~~~~~ 3701 | int len = | ~~~~~~~~~ 3702 | (int) MG_RECV_FUNC(mgr->ctl[1], (char *) &ctl_msg, sizeof(ctl_msg), 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3703 | size_t dummy = MG_SEND_FUNC(mgr->ctl[1], ctl_msg.message, 1, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3704 | DBG(("read %d from ctl socket", len)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3705 | (void) dummy; /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509 */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3706 | if (len >= (int) sizeof(ctl_msg.callback) && ctl_msg.callback != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3707 | struct mg_connection *nc; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 3708 | for (nc = mg_next(mgr, NULL); nc != NULL; nc = mg_next(mgr, nc)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3709 | ctl_msg.callback(nc, MG_EV_POLL, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3710 | ctl_msg.message MG_UD_ARG(nc->user_data)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3711 | } | ~ 3712 | } | ~ 3713 | } | ~ 3714 | #endif | ~~~~~~ 3715 | | 3716 | /* Associate a socket to a connection. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3717 | void mg_socket_if_sock_set(struct mg_connection *nc, sock_t sock) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3718 | mg_set_non_blocking_mode(sock); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3719 | mg_set_close_on_exec(sock); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3720 | nc->sock = sock; | ~~~~~~~~~~~~~~~~ 3721 | DBG(("%p %d", nc, sock)); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 3722 | } | ~ 3723 | | 3724 | void mg_socket_if_init(struct mg_iface *iface) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3725 | (void) iface; | ~~~~~~~~~~~~~ 3726 | DBG(("%p using select()", iface->mgr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3727 | #if MG_ENABLE_BROADCAST | ~~~~~~~~~~~~~~~~~~~~~~~ 3728 | mg_socketpair(iface->mgr->ctl, SOCK_DGRAM); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3729 | #endif | ~~~~~~ 3730 | } | ~ 3731 | | 3732 | void mg_socket_if_free(struct mg_iface *iface) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3733 | (void) iface; | ~~~~~~~~~~~~~ 3734 | } | ~ 3735 | | 3736 | void mg_socket_if_add_conn(struct mg_connection *nc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3737 | (void) nc; | ~~~~~~~~~~ 3738 | } | ~ 3739 | | 3740 | void mg_socket_if_remove_conn(struct mg_connection *nc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3741 | (void) nc; | ~~~~~~~~~~ 3742 | } | ~ 3743 | | 3744 | void mg_add_to_set(sock_t sock, fd_set *set, sock_t *max_fd) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3745 | if (sock != INVALID_SOCKET | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 3746 | #ifdef __unix__ | ~~~~~~~~~~~~~~~ 3747 | && sock < (sock_t) FD_SETSIZE | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3748 | #endif | ~~~~~~ 3749 | ) { | ~~~ 3750 | FD_SET(sock, set); | ~~~~~~~~~~~~~~~~~~ 3751 | if (*max_fd == INVALID_SOCKET || sock > *max_fd) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3752 | *max_fd = sock; | ~~~~~~~~~~~~~~~ 3753 | } | ~ 3754 | } | ~ 3755 | } | ~ 3756 | | 3757 | time_t mg_socket_if_poll(struct mg_iface *iface, int timeout_ms) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3758 | struct mg_mgr *mgr = iface->mgr; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3759 | double now = mg_time(); | ~~~~~~~~~~~~~~~~~~~~~~~ 3760 | double min_timer; | ~~~~~~~~~~~~~~~~~ 3761 | struct mg_connection *nc, *tmp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3762 | struct timeval tv; | ~~~~~~~~~~~~~~~~~~ 3763 | fd_set read_set, write_set, err_set; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3764 | sock_t max_fd = INVALID_SOCKET; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3765 | int num_fds, num_ev, num_timers = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3766 | #ifdef __unix__ | ~~~~~~~~~~~~~~~ 3767 | int try_dup = 1; | ~~~~~~~~~~~~~~~~ 3768 | #endif | ~~~~~~ 3769 | | 3770 | FD_ZERO(&read_set); | ~~~~~~~~~~~~~~~~~~~ 3771 | FD_ZERO(&write_set); | ~~~~~~~~~~~~~~~~~~~~ 3772 | FD_ZERO(&err_set); | ~~~~~~~~~~~~~~~~~~ 3773 | #if MG_ENABLE_BROADCAST | ~~~~~~~~~~~~~~~~~~~~~~~ 3774 | mg_add_to_set(mgr->ctl[1], &read_set, &max_fd); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3775 | #endif | ~~~~~~ 3776 | | 3777 | /* | ~~ 3778 | * Note: it is ok to have connections with sock == INVALID_SOCKET in the list, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3779 | * e.g. timer-only "connections". | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3780 | */ | ~~ 3781 | min_timer = 0; | ~~~~~~~~~~~~~~ 3782 | for (nc = mgr->active_connections, num_fds = 0; nc != NULL; nc = tmp) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3783 | tmp = nc->next; | ~~~~~~~~~~~~~~~ 3784 | | 3785 | if (nc->sock != INVALID_SOCKET) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3786 | num_fds++; | ~~~~~~~~~~ 3787 | | 3788 | #ifdef __unix__ | ~~~~~~~~~~~~~~~ 3789 | /* A hack to make sure all our file descriptos fit into FD_SETSIZE. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3790 | if (nc->sock >= (sock_t) FD_SETSIZE && try_dup) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3791 | int new_sock = dup(nc->sock); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3792 | if (new_sock >= 0) { | ~~~~~~~~~~~~~~~~~~~~ 3793 | if (new_sock < (sock_t) FD_SETSIZE) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3794 | closesocket(nc->sock); | ~~~~~~~~~~~~~~~~~~~~~~ 3795 | DBG(("new sock %d -> %d", nc->sock, new_sock)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3796 | nc->sock = new_sock; | ~~~~~~~~~~~~~~~~~~~~ 3797 | } else { | ~~~~~~~~ 3798 | closesocket(new_sock); | ~~~~~~~~~~~~~~~~~~~~~~ 3799 | DBG(("new sock is still larger than FD_SETSIZE, disregard")); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3800 | try_dup = 0; | ~~~~~~~~~~~~ 3801 | } | ~ 3802 | } else { | ~~~~~~~~ 3803 | try_dup = 0; | ~~~~~~~~~~~~ 3804 | } | ~ 3805 | } | ~ 3806 | #endif | ~~~~~~ 3807 | | 3808 | if (!(nc->flags & MG_F_WANT_WRITE) && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3809 | nc->recv_mbuf.len < nc->recv_mbuf_limit && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3810 | (!(nc->flags & MG_F_UDP) || nc->listener == NULL)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3811 | mg_add_to_set(nc->sock, &read_set, &max_fd); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3812 | } | ~ 3813 | | 3814 | if (((nc->flags & MG_F_CONNECTING) && !(nc->flags & MG_F_WANT_READ)) || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3815 | (nc->send_mbuf.len > 0 && !(nc->flags & MG_F_CONNECTING))) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3816 | mg_add_to_set(nc->sock, &write_set, &max_fd); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3817 | mg_add_to_set(nc->sock, &err_set, &max_fd); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3818 | } | ~ 3819 | } | ~ 3820 | | 3821 | if (nc->ev_timer_time > 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3822 | if (num_timers == 0 || nc->ev_timer_time < min_timer) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3823 | min_timer = nc->ev_timer_time; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3824 | } | ~ 3825 | num_timers++; | ~~~~~~~~~~~~~ 3826 | } | ~ 3827 | } | ~ 3828 | | 3829 | /* | ~~ 3830 | * If there is a timer to be fired earlier than the requested timeout, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3831 | * adjust the timeout. | ~~~~~~~~~~~~~~~~~~~~~ 3832 | */ | ~~ 3833 | if (num_timers > 0) { | ~~~~~~~~~~~~~~~~~~~~~ 3834 | double timer_timeout_ms = (min_timer - mg_time()) * 1000 + 1 /* rounding */; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3835 | if (timer_timeout_ms < timeout_ms) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3836 | timeout_ms = (int) timer_timeout_ms; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3837 | } | ~ 3838 | } | ~ 3839 | if (timeout_ms < 0) timeout_ms = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3840 | | 3841 | tv.tv_sec = timeout_ms / 1000; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3842 | tv.tv_usec = (timeout_ms % 1000) * 1000; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3843 | | 3844 | num_ev = select((int) max_fd + 1, &read_set, &write_set, &err_set, &tv); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3845 | now = mg_time(); | ~~~~~~~~~~~~~~~~ 3846 | #if 0 | ~~~~~ 3847 | DBG(("select @ %ld num_ev=%d of %d, timeout=%d", (long) now, num_ev, num_fds, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3848 | timeout_ms)); | ~~~~~~~~~~~~~ 3849 | #endif | ~~~~~~ 3850 | | 3851 | #if MG_ENABLE_BROADCAST | ~~~~~~~~~~~~~~~~~~~~~~~ 3852 | if (num_ev > 0 && mgr->ctl[1] != INVALID_SOCKET && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3853 | FD_ISSET(mgr->ctl[1], &read_set)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3854 | mg_mgr_handle_ctl_sock(mgr); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3855 | } | ~ 3856 | #endif | ~~~~~~ 3857 | | 3858 | for (nc = mgr->active_connections; nc != NULL; nc = tmp) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3859 | int fd_flags = 0; | ~~~~~~~~~~~~~~~~~ 3860 | if (nc->sock != INVALID_SOCKET) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3861 | if (num_ev > 0) { | ~~~~~~~~~~~~~~~~~ 3862 | fd_flags = (FD_ISSET(nc->sock, &read_set) && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3863 | (!(nc->flags & MG_F_UDP) || nc->listener == NULL) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3864 | ? _MG_F_FD_CAN_READ | ~~~~~~~~~~~~~~~~~~~ 3865 | : 0) | | ~~~~~~ 3866 | (FD_ISSET(nc->sock, &write_set) ? _MG_F_FD_CAN_WRITE : 0) | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3867 | (FD_ISSET(nc->sock, &err_set) ? _MG_F_FD_ERROR : 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3868 | } | ~ 3869 | #if MG_LWIP | ~~~~~~~~~~~ 3870 | /* With LWIP socket emulation layer, we don't get write events for UDP */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3871 | if ((nc->flags & MG_F_UDP) && nc->listener == NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3872 | fd_flags |= _MG_F_FD_CAN_WRITE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3873 | } | ~ 3874 | #endif | ~~~~~~ 3875 | } | ~ 3876 | tmp = nc->next; | ~~~~~~~~~~~~~~~ 3877 | mg_mgr_handle_conn(nc, fd_flags, now); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3878 | } | ~ 3879 | | 3880 | for (nc = mgr->active_connections; nc != NULL; nc = tmp) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3881 | tmp = nc->next; | ~~~~~~~~~~~~~~~ 3882 | if ((nc->flags & MG_F_CLOSE_IMMEDIATELY) || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3883 | (nc->send_mbuf.len == 0 && (nc->flags & MG_F_SEND_AND_CLOSE))) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3884 | mg_close_conn(nc); | ~~~~~~~~~~~~~~~~~~ 3885 | } | ~ 3886 | } | ~ 3887 | | 3888 | return (time_t) now; | ~~~~~~~~~~~~~~~~~~~~ 3889 | } | ~ 3890 | | 3891 | #if MG_ENABLE_BROADCAST | ~~~~~~~~~~~~~~~~~~~~~~~ 3892 | MG_INTERNAL void mg_socketpair_close(sock_t *sock) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3893 | while (1) { | ~~~~~~~~~~~ 3894 | if (closesocket(*sock) == -1 && errno == EINTR) continue; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3895 | break; | ~~~~~~ 3896 | } | ~ 3897 | *sock = INVALID_SOCKET; | ~~~~~~~~~~~~~~~~~~~~~~~ 3898 | } | ~ 3899 | | 3900 | MG_INTERNAL sock_t | ~~~~~~~~~~~~~~~~~~ 3901 | mg_socketpair_accept(sock_t sock, union socket_address *sa, socklen_t sa_len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3902 | sock_t rc; | ~~~~~~~~~~ 3903 | while (1) { | ~~~~~~~~~~~ 3904 | if ((rc = accept(sock, &sa->sa, &sa_len)) == INVALID_SOCKET && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3905 | errno == EINTR) | ~~~~~~~~~~~~~~~ 3906 | continue; | ~~~~~~~~~ 3907 | break; | ~~~~~~ 3908 | } | ~ 3909 | return rc; | ~~~~~~~~~~ 3910 | } | ~ 3911 | | 3912 | int mg_socketpair(sock_t sp[2], int sock_type) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3913 | union socket_address sa; | ~~~~~~~~~~~~~~~~~~~~~~~~ 3914 | sock_t sock; | ~~~~~~~~~~~~ 3915 | socklen_t len = sizeof(sa.sin); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3916 | int ret = 0; | ~~~~~~~~~~~~ 3917 | | 3918 | sock = sp[0] = sp[1] = INVALID_SOCKET; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3919 | | 3920 | (void) memset(&sa, 0, sizeof(sa)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3921 | sa.sin.sin_family = AF_INET; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3922 | sa.sin.sin_port = htons(0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3923 | sa.sin.sin_addr.s_addr = htonl(0x7f000001); /* 127.0.0.1 */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3924 | | 3925 | if ((sock = socket(AF_INET, sock_type, 0)) == INVALID_SOCKET) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3926 | } else if (bind(sock, &sa.sa, len) != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3927 | } else if (sock_type == SOCK_STREAM && listen(sock, 1) != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3928 | } else if (getsockname(sock, &sa.sa, &len) != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3929 | } else if ((sp[0] = socket(AF_INET, sock_type, 0)) == INVALID_SOCKET) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3930 | } else if (connect(sp[0], &sa.sa, len) != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3931 | } else if (sock_type == SOCK_DGRAM && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3932 | (getsockname(sp[0], &sa.sa, &len) != 0 || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3933 | connect(sock, &sa.sa, len) != 0)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3934 | } else if ((sp[1] = (sock_type == SOCK_DGRAM ? sock : mg_socketpair_accept( | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3935 | sock, &sa, len))) == | ~~~~~~~~~~~~~~~~~~~~ 3936 | INVALID_SOCKET) { | ~~~~~~~~~~~~~~~~~ 3937 | } else { | ~~~~~~~~ 3938 | mg_set_close_on_exec(sp[0]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3939 | mg_set_close_on_exec(sp[1]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3940 | if (sock_type == SOCK_STREAM) mg_socketpair_close(&sock); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3941 | ret = 1; | ~~~~~~~~ 3942 | } | ~ 3943 | | 3944 | if (!ret) { | ~~~~~~~~~~~ 3945 | if (sp[0] != INVALID_SOCKET) mg_socketpair_close(&sp[0]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3946 | if (sp[1] != INVALID_SOCKET) mg_socketpair_close(&sp[1]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3947 | if (sock != INVALID_SOCKET) mg_socketpair_close(&sock); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3948 | } | ~ 3949 | | 3950 | return ret; | ~~~~~~~~~~~ 3951 | } | ~ 3952 | #endif /* MG_ENABLE_BROADCAST */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3953 | | 3954 | static void mg_sock_get_addr(sock_t sock, int remote, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3955 | union socket_address *sa) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3956 | socklen_t slen = sizeof(*sa); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3957 | memset(sa, 0, slen); | ~~~~~~~~~~~~~~~~~~~~ 3958 | if (remote) { | ~~~~~~~~~~~~~ 3959 | getpeername(sock, &sa->sa, &slen); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3960 | } else { | ~~~~~~~~ 3961 | getsockname(sock, &sa->sa, &slen); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3962 | } | ~ 3963 | } | ~ 3964 | | 3965 | void mg_sock_to_str(sock_t sock, char *buf, size_t len, int flags) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3966 | union socket_address sa; | ~~~~~~~~~~~~~~~~~~~~~~~~ 3967 | mg_sock_get_addr(sock, flags & MG_SOCK_STRINGIFY_REMOTE, &sa); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3968 | mg_sock_addr_to_str(&sa, buf, len, flags); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3969 | } | ~ 3970 | | 3971 | void mg_socket_if_get_conn_addr(struct mg_connection *nc, int remote, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3972 | union socket_address *sa) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3973 | if ((nc->flags & MG_F_UDP) && remote) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3974 | memcpy(sa, &nc->sa, sizeof(*sa)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3975 | return; | ~~~~~~~ 3976 | } | ~ 3977 | mg_sock_get_addr(nc->sock, remote, sa); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3978 | } | ~ 3979 | | 3980 | /* clang-format off */ | ~~~~~~~~~~~~~~~~~~~~~~ 3981 | #define MG_SOCKET_IFACE_VTABLE \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3982 | { \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3983 | mg_socket_if_init, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3984 | mg_socket_if_free, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3985 | mg_socket_if_add_conn, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3986 | mg_socket_if_remove_conn, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3987 | mg_socket_if_poll, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3988 | mg_socket_if_listen_tcp, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3989 | mg_socket_if_listen_udp, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3990 | mg_socket_if_connect_tcp, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3991 | mg_socket_if_connect_udp, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3992 | mg_socket_if_tcp_send, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3993 | mg_socket_if_udp_send, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3994 | mg_socket_if_recved, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3995 | mg_socket_if_create_conn, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3996 | mg_socket_if_destroy_conn, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3997 | mg_socket_if_sock_set, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3998 | mg_socket_if_get_conn_addr, \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3999 | } | ~ 4000 | /* clang-format on */ | ~~~~~~~~~~~~~~~~~~~~~ 4001 | | 4002 | const struct mg_iface_vtable mg_socket_iface_vtable = MG_SOCKET_IFACE_VTABLE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4003 | #if MG_NET_IF == MG_NET_IF_SOCKET | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4004 | const struct mg_iface_vtable mg_default_iface_vtable = MG_SOCKET_IFACE_VTABLE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4005 | #endif | ~~~~~~ 4006 | | 4007 | #endif /* MG_ENABLE_NET_IF_SOCKET */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4008 | #ifdef MG_MODULE_LINES | ~~~~~~~~~~~~~~~~~~~~~~ 4009 | #line 1 "mongoose/src/mg_net_if_socks.c" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4010 | #endif | ~~~~~~ 4011 | /* | ~~ 4012 | * Copyright (c) 2014-2016 Cesanta Software Limited | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4013 | * All rights reserved | ~~~~~~~~~~~~~~~~~~~~~ 4014 | */ | ~~ 4015 | | 4016 | #if MG_ENABLE_SOCKS | ~~~~~~~~~~~~~~~~~~~ 4017 | | 4018 | struct socksdata { | ~~~~~~~~~~~~~~~~~~ 4019 | char *proxy_addr; /* HOST:PORT of the socks5 proxy server */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4020 | struct mg_connection *s; /* Respective connection to the server */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4021 | struct mg_connection *c; /* Connection to the client */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4022 | struct mbuf tmp; /* Temporary buffer for sent data */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4023 | }; | ~~ 4024 | | 4025 | static void socks_if_disband(struct socksdata *d) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4026 | LOG(LL_DEBUG, ("disbanding proxy %p %p", d->c, d->s)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4027 | if (d->c) d->c->flags |= MG_F_SEND_AND_CLOSE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4028 | if (d->s) d->s->flags |= MG_F_SEND_AND_CLOSE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4029 | d->c = d->s = NULL; | ~~~~~~~~~~~~~~~~~~~ 4030 | } | ~ 4031 | | 4032 | static void socks_if_handler(struct mg_connection *c, int ev, void *ev_data) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4033 | struct socksdata *d = (struct socksdata *) c->user_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4034 | if (ev == MG_EV_CONNECT) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4035 | int res = *(int *) ev_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4036 | if (res == 0) { | ~~~~~~~~~~~~~~~ 4037 | /* Send handshake to the proxy server */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4038 | unsigned char buf[] = {MG_SOCKS_VERSION, 1, MG_SOCKS_HANDSHAKE_NOAUTH}; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4039 | mg_send(d->s, buf, sizeof(buf)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4040 | LOG(LL_DEBUG, ("Sent handshake to %s", d->proxy_addr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4041 | } else { | ~~~~~~~~ 4042 | LOG(LL_ERROR, ("Cannot connect to %s: %d", d->proxy_addr, res)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4043 | d->c->flags |= MG_F_CLOSE_IMMEDIATELY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4044 | } | ~ 4045 | } else if (ev == MG_EV_CLOSE) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4046 | socks_if_disband(d); | ~~~~~~~~~~~~~~~~~~~~ 4047 | } else if (ev == MG_EV_RECV) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4048 | /* Handle handshake reply */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4049 | if (!(c->flags & MG_SOCKS_HANDSHAKE_DONE)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4050 | /* TODO(lsm): process IPv6 too */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4051 | unsigned char buf[10] = {MG_SOCKS_VERSION, MG_SOCKS_CMD_CONNECT, 0, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4052 | MG_SOCKS_ADDR_IPV4}; | ~~~~~~~~~~~~~~~~~~~~ 4053 | if (c->recv_mbuf.len < 2) return; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4054 | if ((unsigned char) c->recv_mbuf.buf[1] == MG_SOCKS_HANDSHAKE_FAILURE) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4055 | LOG(LL_ERROR, ("Server kicked us out")); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4056 | socks_if_disband(d); | ~~~~~~~~~~~~~~~~~~~~ 4057 | return; | ~~~~~~~ 4058 | } | ~ 4059 | mbuf_remove(&c->recv_mbuf, 2); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4060 | c->flags |= MG_SOCKS_HANDSHAKE_DONE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4061 | | 4062 | /* Send connect request */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4063 | memcpy(buf + 4, &d->c->sa.sin.sin_addr, 4); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4064 | memcpy(buf + 8, &d->c->sa.sin.sin_port, 2); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4065 | mg_send(c, buf, sizeof(buf)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4066 | } | ~ 4067 | /* Process connect request */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4068 | if ((c->flags & MG_SOCKS_HANDSHAKE_DONE) && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4069 | !(c->flags & MG_SOCKS_CONNECT_DONE)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4070 | if (c->recv_mbuf.len < 10) return; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4071 | if (c->recv_mbuf.buf[1] != MG_SOCKS_SUCCESS) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4072 | LOG(LL_ERROR, ("Socks connection error: %d", c->recv_mbuf.buf[1])); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4073 | socks_if_disband(d); | ~~~~~~~~~~~~~~~~~~~~ 4074 | return; | ~~~~~~~ 4075 | } | ~ 4076 | mbuf_remove(&c->recv_mbuf, 10); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4077 | c->flags |= MG_SOCKS_CONNECT_DONE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4078 | /* Connected. Move sent data from client, if any, to server */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4079 | if (d->s && d->c) { | ~~~~~~~~~~~~~~~~~~~ 4080 | mbuf_append(&d->s->send_mbuf, d->tmp.buf, d->tmp.len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4081 | mbuf_free(&d->tmp); | ~~~~~~~~~~~~~~~~~~~ 4082 | } | ~ 4083 | } | ~ 4084 | /* All flags are set, we're in relay mode */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4085 | if ((c->flags & MG_SOCKS_CONNECT_DONE) && d->c && d->s) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4086 | mbuf_append(&d->c->recv_mbuf, d->s->recv_mbuf.buf, d->s->recv_mbuf.len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4087 | mbuf_remove(&d->s->recv_mbuf, d->s->recv_mbuf.len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4088 | } | ~ 4089 | } | ~ 4090 | } | ~ 4091 | | 4092 | static void mg_socks_if_connect_tcp(struct mg_connection *c, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4093 | const union socket_address *sa) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4094 | struct socksdata *d = (struct socksdata *) c->iface->data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4095 | d->c = c; | ~~~~~~~~~ 4096 | d->s = mg_connect(c->mgr, d->proxy_addr, socks_if_handler); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4097 | d->s->user_data = d; | ~~~~~~~~~~~~~~~~~~~~ 4098 | LOG(LL_DEBUG, ("%p %s", c, d->proxy_addr)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4099 | (void) sa; | ~~~~~~~~~~ 4100 | } | ~ 4101 | | 4102 | static void mg_socks_if_connect_udp(struct mg_connection *c) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4103 | (void) c; | ~~~~~~~~~ 4104 | } | ~ 4105 | | 4106 | static int mg_socks_if_listen_tcp(struct mg_connection *c, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4107 | union socket_address *sa) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4108 | (void) c; | ~~~~~~~~~ 4109 | (void) sa; | ~~~~~~~~~~ 4110 | return 0; | ~~~~~~~~~ 4111 | } | ~ 4112 | | 4113 | static int mg_socks_if_listen_udp(struct mg_connection *c, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4114 | union socket_address *sa) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4115 | (void) c; | ~~~~~~~~~ 4116 | (void) sa; | ~~~~~~~~~~ 4117 | return -1; | ~~~~~~~~~~ 4118 | } | ~ 4119 | | 4120 | static void mg_socks_if_tcp_send(struct mg_connection *c, const void *buf, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4121 | size_t len) { | ~~~~~~~~~~~~~ 4122 | struct socksdata *d = (struct socksdata *) c->iface->data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4123 | LOG(LL_DEBUG, ("%p -> %p %d %d", c, buf, (int) len, (int) c->send_mbuf.len)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4124 | if (d && d->s && d->s->flags & MG_SOCKS_CONNECT_DONE) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4125 | mbuf_append(&d->s->send_mbuf, d->tmp.buf, d->tmp.len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4126 | mbuf_append(&d->s->send_mbuf, buf, len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4127 | mbuf_free(&d->tmp); | ~~~~~~~~~~~~~~~~~~~ 4128 | } else { | ~~~~~~~~ 4129 | mbuf_append(&d->tmp, buf, len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4130 | } | ~ 4131 | } | ~ 4132 | | 4133 | static void mg_socks_if_udp_send(struct mg_connection *c, const void *buf, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4134 | size_t len) { | ~~~~~~~~~~~~~ 4135 | (void) c; | ~~~~~~~~~ 4136 | (void) buf; | ~~~~~~~~~~~ 4137 | (void) len; | ~~~~~~~~~~~ 4138 | } | ~ 4139 | | 4140 | static void mg_socks_if_recved(struct mg_connection *c, size_t len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4141 | (void) c; | ~~~~~~~~~ 4142 | (void) len; | ~~~~~~~~~~~ 4143 | } | ~ 4144 | | 4145 | static int mg_socks_if_create_conn(struct mg_connection *c) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4146 | (void) c; | ~~~~~~~~~ 4147 | return 1; | ~~~~~~~~~ 4148 | } | ~ 4149 | | 4150 | static void mg_socks_if_destroy_conn(struct mg_connection *c) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4151 | c->iface->vtable->free(c->iface); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4152 | MG_FREE(c->iface); | ~~~~~~~~~~~~~~~~~~ 4153 | c->iface = NULL; | ~~~~~~~~~~~~~~~~ 4154 | LOG(LL_DEBUG, ("%p", c)); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 4155 | } | ~ 4156 | | 4157 | static void mg_socks_if_sock_set(struct mg_connection *c, sock_t sock) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4158 | (void) c; | ~~~~~~~~~ 4159 | (void) sock; | ~~~~~~~~~~~~ 4160 | } | ~ 4161 | | 4162 | static void mg_socks_if_init(struct mg_iface *iface) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4163 | (void) iface; | ~~~~~~~~~~~~~ 4164 | } | ~ 4165 | | 4166 | static void mg_socks_if_free(struct mg_iface *iface) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4167 | struct socksdata *d = (struct socksdata *) iface->data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4168 | LOG(LL_DEBUG, ("%p", iface)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4169 | if (d != NULL) { | ~~~~~~~~~~~~~~~~ 4170 | socks_if_disband(d); | ~~~~~~~~~~~~~~~~~~~~ 4171 | mbuf_free(&d->tmp); | ~~~~~~~~~~~~~~~~~~~ 4172 | MG_FREE(d->proxy_addr); | ~~~~~~~~~~~~~~~~~~~~~~~ 4173 | MG_FREE(d); | ~~~~~~~~~~~ 4174 | iface->data = NULL; | ~~~~~~~~~~~~~~~~~~~ 4175 | } | ~ 4176 | } | ~ 4177 | | 4178 | static void mg_socks_if_add_conn(struct mg_connection *c) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4179 | c->sock = INVALID_SOCKET; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 4180 | } | ~ 4181 | | 4182 | static void mg_socks_if_remove_conn(struct mg_connection *c) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4183 | (void) c; | ~~~~~~~~~ 4184 | } | ~ 4185 | | 4186 | static time_t mg_socks_if_poll(struct mg_iface *iface, int timeout_ms) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4187 | LOG(LL_DEBUG, ("%p", iface)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4188 | (void) iface; | ~~~~~~~~~~~~~ 4189 | (void) timeout_ms; | ~~~~~~~~~~~~~~~~~~ 4190 | return (time_t) cs_time(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4191 | } | ~ 4192 | | 4193 | static void mg_socks_if_get_conn_addr(struct mg_connection *c, int remote, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4194 | union socket_address *sa) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4195 | LOG(LL_DEBUG, ("%p", c)); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 4196 | (void) c; | ~~~~~~~~~ 4197 | (void) remote; | ~~~~~~~~~~~~~~ 4198 | (void) sa; | ~~~~~~~~~~ 4199 | } | ~ 4200 | | 4201 | const struct mg_iface_vtable mg_socks_iface_vtable = { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4202 | mg_socks_if_init, mg_socks_if_free, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4203 | mg_socks_if_add_conn, mg_socks_if_remove_conn, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4204 | mg_socks_if_poll, mg_socks_if_listen_tcp, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4205 | mg_socks_if_listen_udp, mg_socks_if_connect_tcp, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4206 | mg_socks_if_connect_udp, mg_socks_if_tcp_send, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4207 | mg_socks_if_udp_send, mg_socks_if_recved, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4208 | mg_socks_if_create_conn, mg_socks_if_destroy_conn, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4209 | mg_socks_if_sock_set, mg_socks_if_get_conn_addr, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4210 | }; | ~~ 4211 | | 4212 | struct mg_iface *mg_socks_mk_iface(struct mg_mgr *mgr, const char *proxy_addr) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4213 | struct mg_iface *iface = mg_if_create_iface(&mg_socks_iface_vtable, mgr); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4214 | iface->data = MG_CALLOC(1, sizeof(struct socksdata)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4215 | ((struct socksdata *) iface->data)->proxy_addr = strdup(proxy_addr); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4216 | return iface; | ~~~~~~~~~~~~~ 4217 | } | ~ 4218 | | 4219 | #endif | ~~~~~~ 4220 | #ifdef MG_MODULE_LINES | ~~~~~~~~~~~~~~~~~~~~~~ 4221 | #line 1 "mongoose/src/mg_ssl_if_openssl.c" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4222 | #endif | ~~~~~~ 4223 | /* | ~~ 4224 | * Copyright (c) 2014-2016 Cesanta Software Limited | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4225 | * All rights reserved | ~~~~~~~~~~~~~~~~~~~~~ 4226 | */ | ~~ 4227 | | 4228 | #if MG_ENABLE_SSL && MG_SSL_IF == MG_SSL_IF_OPENSSL | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4229 | | 4230 | #ifdef __APPLE__ | ~~~~~~~~~~~~~~~~ 4231 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4232 | #endif | ~~~~~~ 4233 | | 4234 | #include | ~~~~~~~~~~~~~~~~~~~~~~~~ 4235 | | 4236 | struct mg_ssl_if_ctx { | ~~~~~~~~~~~~~~~~~~~~~~ 4237 | SSL *ssl; | ~~~~~~~~~ 4238 | SSL_CTX *ssl_ctx; | ~~~~~~~~~~~~~~~~~ 4239 | struct mbuf psk; | ~~~~~~~~~~~~~~~~ 4240 | size_t identity_len; | ~~~~~~~~~~~~~~~~~~~~ 4241 | }; | ~~ 4242 | | 4243 | void mg_ssl_if_init() { | ~~~~~~~~~~~~~~~~~~~~~~~ 4244 | SSL_library_init(); | ~~~~~~~~~~~~~~~~~~~ 4245 | } | ~ 4246 | | 4247 | enum mg_ssl_if_result mg_ssl_if_conn_accept(struct mg_connection *nc, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4248 | struct mg_connection *lc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4249 | struct mg_ssl_if_ctx *ctx = | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4250 | (struct mg_ssl_if_ctx *) MG_CALLOC(1, sizeof(*ctx)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4251 | struct mg_ssl_if_ctx *lc_ctx = (struct mg_ssl_if_ctx *) lc->ssl_if_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4252 | nc->ssl_if_data = ctx; | ~~~~~~~~~~~~~~~~~~~~~~ 4253 | if (ctx == NULL || lc_ctx == NULL) return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4254 | ctx->ssl_ctx = lc_ctx->ssl_ctx; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4255 | if ((ctx->ssl = SSL_new(ctx->ssl_ctx)) == NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4256 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4257 | } | ~ 4258 | return MG_SSL_OK; | ~~~~~~~~~~~~~~~~~ 4259 | } | ~ 4260 | | 4261 | static enum mg_ssl_if_result mg_use_cert(SSL_CTX *ctx, const char *cert, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4262 | const char *key, const char **err_msg); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4263 | static enum mg_ssl_if_result mg_use_ca_cert(SSL_CTX *ctx, const char *cert); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4264 | static enum mg_ssl_if_result mg_set_cipher_list(SSL_CTX *ctx, const char *cl); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4265 | static enum mg_ssl_if_result mg_ssl_if_ossl_set_psk(struct mg_ssl_if_ctx *ctx, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4266 | const char *identity, | ~~~~~~~~~~~~~~~~~~~~~ 4267 | const char *key_str); | ~~~~~~~~~~~~~~~~~~~~~ 4268 | | 4269 | enum mg_ssl_if_result mg_ssl_if_conn_init( | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4270 | struct mg_connection *nc, const struct mg_ssl_if_conn_params *params, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4271 | const char **err_msg) { | ~~~~~~~~~~~~~~~~~~~~~~~ 4272 | struct mg_ssl_if_ctx *ctx = | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4273 | (struct mg_ssl_if_ctx *) MG_CALLOC(1, sizeof(*ctx)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4274 | DBG(("%p %s,%s,%s", nc, (params->cert ? params->cert : ""), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4275 | (params->key ? params->key : ""), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4276 | (params->ca_cert ? params->ca_cert : ""))); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4277 | if (ctx == NULL) { | ~~~~~~~~~~~~~~~~~~ 4278 | MG_SET_PTRPTR(err_msg, "Out of memory"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4279 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4280 | } | ~ 4281 | nc->ssl_if_data = ctx; | ~~~~~~~~~~~~~~~~~~~~~~ 4282 | if (nc->flags & MG_F_LISTENING) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4283 | ctx->ssl_ctx = SSL_CTX_new(SSLv23_server_method()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4284 | } else { | ~~~~~~~~ 4285 | ctx->ssl_ctx = SSL_CTX_new(SSLv23_client_method()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4286 | } | ~ 4287 | if (ctx->ssl_ctx == NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4288 | MG_SET_PTRPTR(err_msg, "Failed to create SSL context"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4289 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4290 | } | ~ 4291 | | 4292 | #ifndef KR_VERSION | ~~~~~~~~~~~~~~~~~~ 4293 | /* Disable deprecated protocols. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4294 | SSL_CTX_set_options(ctx->ssl_ctx, SSL_OP_NO_SSLv2); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4295 | SSL_CTX_set_options(ctx->ssl_ctx, SSL_OP_NO_SSLv3); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4296 | SSL_CTX_set_options(ctx->ssl_ctx, SSL_OP_NO_TLSv1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4297 | #ifdef MG_SSL_OPENSSL_NO_COMPRESSION | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4298 | SSL_CTX_set_options(ctx->ssl_ctx, SSL_OP_NO_COMPRESSION); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4299 | #endif | ~~~~~~ 4300 | #ifdef MG_SSL_OPENSSL_CIPHER_SERVER_PREFERENCE | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4301 | SSL_CTX_set_options(ctx->ssl_ctx, SSL_OP_CIPHER_SERVER_PREFERENCE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4302 | #endif | ~~~~~~ 4303 | #else | ~~~~~ 4304 | /* Krypton only supports TLSv1.2 anyway. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4305 | #endif | ~~~~~~ 4306 | | 4307 | if (params->cert != NULL && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4308 | mg_use_cert(ctx->ssl_ctx, params->cert, params->key, err_msg) != | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4309 | MG_SSL_OK) { | ~~~~~~~~~~~~ 4310 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4311 | } | ~ 4312 | | 4313 | if (params->ca_cert != NULL && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4314 | mg_use_ca_cert(ctx->ssl_ctx, params->ca_cert) != MG_SSL_OK) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4315 | MG_SET_PTRPTR(err_msg, "Invalid SSL CA cert"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4316 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4317 | } | ~ 4318 | | 4319 | if (params->server_name != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4320 | #ifdef KR_VERSION | ~~~~~~~~~~~~~~~~~ 4321 | SSL_CTX_kr_set_verify_name(ctx->ssl_ctx, params->server_name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4322 | #else | ~~~~~ 4323 | /* TODO(rojer): Implement server name verification on OpenSSL. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4324 | #endif | ~~~~~~ 4325 | } | ~ 4326 | | 4327 | if (mg_set_cipher_list(ctx->ssl_ctx, params->cipher_suites) != MG_SSL_OK) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4328 | MG_SET_PTRPTR(err_msg, "Invalid cipher suite list"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4329 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4330 | } | ~ 4331 | | 4332 | mbuf_init(&ctx->psk, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~ 4333 | if (mg_ssl_if_ossl_set_psk(ctx, params->psk_identity, params->psk_key) != | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4334 | MG_SSL_OK) { | ~~~~~~~~~~~~ 4335 | MG_SET_PTRPTR(err_msg, "Invalid PSK settings"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4336 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4337 | } | ~ 4338 | | 4339 | if (!(nc->flags & MG_F_LISTENING) && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4340 | (ctx->ssl = SSL_new(ctx->ssl_ctx)) == NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4341 | MG_SET_PTRPTR(err_msg, "Failed to create SSL session"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4342 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4343 | } | ~ 4344 | | 4345 | nc->flags |= MG_F_SSL; | ~~~~~~~~~~~~~~~~~~~~~~ 4346 | | 4347 | return MG_SSL_OK; | ~~~~~~~~~~~~~~~~~ 4348 | } | ~ 4349 | | 4350 | static enum mg_ssl_if_result mg_ssl_if_ssl_err(struct mg_connection *nc, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4351 | int res) { | ~~~~~~~~~~ 4352 | struct mg_ssl_if_ctx *ctx = (struct mg_ssl_if_ctx *) nc->ssl_if_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4353 | int err = SSL_get_error(ctx->ssl, res); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4354 | if (err == SSL_ERROR_WANT_READ) return MG_SSL_WANT_READ; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4355 | if (err == SSL_ERROR_WANT_WRITE) return MG_SSL_WANT_WRITE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4356 | DBG(("%p %p SSL error: %d %d", nc, ctx->ssl_ctx, res, err)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4357 | nc->err = err; | ~~~~~~~~~~~~~~ 4358 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4359 | } | ~ 4360 | | 4361 | enum mg_ssl_if_result mg_ssl_if_handshake(struct mg_connection *nc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4362 | struct mg_ssl_if_ctx *ctx = (struct mg_ssl_if_ctx *) nc->ssl_if_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4363 | int server_side = (nc->listener != NULL); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4364 | int res; | ~~~~~~~~ 4365 | /* If descriptor is not yet set, do it now. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4366 | if (SSL_get_fd(ctx->ssl) < 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4367 | if (SSL_set_fd(ctx->ssl, nc->sock) != 1) return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4368 | } | ~ 4369 | res = server_side ? SSL_accept(ctx->ssl) : SSL_connect(ctx->ssl); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4370 | if (res != 1) return mg_ssl_if_ssl_err(nc, res); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4371 | return MG_SSL_OK; | ~~~~~~~~~~~~~~~~~ 4372 | } | ~ 4373 | | 4374 | int mg_ssl_if_read(struct mg_connection *nc, void *buf, size_t buf_size) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4375 | struct mg_ssl_if_ctx *ctx = (struct mg_ssl_if_ctx *) nc->ssl_if_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4376 | int n = SSL_read(ctx->ssl, buf, buf_size); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4377 | DBG(("%p %d -> %d", nc, (int) buf_size, n)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4378 | if (n < 0) return mg_ssl_if_ssl_err(nc, n); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4379 | if (n == 0) nc->flags |= MG_F_CLOSE_IMMEDIATELY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4380 | return n; | ~~~~~~~~~ 4381 | } | ~ 4382 | | 4383 | int mg_ssl_if_write(struct mg_connection *nc, const void *data, size_t len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4384 | struct mg_ssl_if_ctx *ctx = (struct mg_ssl_if_ctx *) nc->ssl_if_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4385 | int n = SSL_write(ctx->ssl, data, len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4386 | DBG(("%p %d -> %d", nc, (int) len, n)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4387 | if (n <= 0) return mg_ssl_if_ssl_err(nc, n); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4388 | return n; | ~~~~~~~~~ 4389 | } | ~ 4390 | | 4391 | void mg_ssl_if_conn_close_notify(struct mg_connection *nc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4392 | struct mg_ssl_if_ctx *ctx = (struct mg_ssl_if_ctx *) nc->ssl_if_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4393 | if (ctx == NULL) return; | ~~~~~~~~~~~~~~~~~~~~~~~~ 4394 | SSL_shutdown(ctx->ssl); | ~~~~~~~~~~~~~~~~~~~~~~~ 4395 | } | ~ 4396 | | 4397 | void mg_ssl_if_conn_free(struct mg_connection *nc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4398 | struct mg_ssl_if_ctx *ctx = (struct mg_ssl_if_ctx *) nc->ssl_if_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4399 | if (ctx == NULL) return; | ~~~~~~~~~~~~~~~~~~~~~~~~ 4400 | nc->ssl_if_data = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~ 4401 | if (ctx->ssl != NULL) SSL_free(ctx->ssl); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4402 | if (ctx->ssl_ctx != NULL && nc->listener == NULL) SSL_CTX_free(ctx->ssl_ctx); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4403 | mbuf_free(&ctx->psk); | ~~~~~~~~~~~~~~~~~~~~~ 4404 | memset(ctx, 0, sizeof(*ctx)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4405 | MG_FREE(ctx); | ~~~~~~~~~~~~~ 4406 | } | ~ 4407 | | 4408 | /* | ~~ 4409 | * Cipher suite options used for TLS negotiation. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4410 | * https://wiki.mozilla.org/Security/Server_Side_TLS#Recommended_configurations | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4411 | */ | ~~ 4412 | static const char mg_s_cipher_list[] = | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4413 | #if defined(MG_SSL_CRYPTO_MODERN) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4414 | "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4415 | "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4416 | "DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4417 | "ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4418 | "ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4419 | "ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4420 | "DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4421 | "DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4422 | "!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4423 | #elif defined(MG_SSL_CRYPTO_OLD) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4424 | "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4425 | "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4426 | "DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4427 | "ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4428 | "ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4429 | "ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4430 | "DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4431 | "DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4432 | "ECDHE-ECDSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4433 | "AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:DES-CBC3-SHA:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4434 | "HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4435 | "!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4436 | #else /* Default - intermediate. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4437 | "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4438 | "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4439 | "DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4440 | "ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4441 | "ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4442 | "ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4443 | "DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4444 | "DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4445 | "AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4446 | "DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4447 | "!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4448 | #endif | ~~~~~~ 4449 | ; | ~ 4450 | | 4451 | /* | ~~ 4452 | * Default DH params for PFS cipher negotiation. This is a 2048-bit group. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4453 | * Will be used if none are provided by the user in the certificate file. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4454 | */ | ~~ 4455 | #if !MG_DISABLE_PFS && !defined(KR_VERSION) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4456 | static const char mg_s_default_dh_params[] = | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4457 | "\ | ~~ 4458 | -----BEGIN DH PARAMETERS-----\n\ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4459 | MIIBCAKCAQEAlvbgD/qh9znWIlGFcV0zdltD7rq8FeShIqIhkQ0C7hYFThrBvF2E\n\ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4460 | Z9bmgaP+sfQwGpVlv9mtaWjvERbu6mEG7JTkgmVUJrUt/wiRzwTaCXBqZkdUO8Tq\n\ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4461 | +E6VOEQAilstG90ikN1Tfo+K6+X68XkRUIlgawBTKuvKVwBhuvlqTGerOtnXWnrt\n\ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4462 | ym//hd3cd5PBYGBix0i7oR4xdghvfR2WLVu0LgdThTBb6XP7gLd19cQ1JuBtAajZ\n\ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4463 | wMuPn7qlUkEFDIkAZy59/Hue/H2Q2vU/JsvVhHWCQBL4F1ofEAt50il6ZxR1QfFK\n\ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4464 | 9VGKDC4oOgm9DlxwwBoC2FjqmvQlqVV3kwIBAg==\n\ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4465 | -----END DH PARAMETERS-----\n"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4466 | #endif | ~~~~~~ 4467 | | 4468 | static enum mg_ssl_if_result mg_use_ca_cert(SSL_CTX *ctx, const char *cert) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4469 | if (cert == NULL || strcmp(cert, "*") == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4470 | return MG_SSL_OK; | ~~~~~~~~~~~~~~~~~ 4471 | } | ~ 4472 | SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4473 | return SSL_CTX_load_verify_locations(ctx, cert, NULL) == 1 ? MG_SSL_OK | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4474 | : MG_SSL_ERROR; | ~~~~~~~~~~~~~~~ 4475 | } | ~ 4476 | | 4477 | static enum mg_ssl_if_result mg_use_cert(SSL_CTX *ctx, const char *cert, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4478 | const char *key, | ~~~~~~~~~~~~~~~~ 4479 | const char **err_msg) { | ~~~~~~~~~~~~~~~~~~~~~~~ 4480 | if (key == NULL) key = cert; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4481 | if (cert == NULL || cert[0] == '\0' || key == NULL || key[0] == '\0') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4482 | return MG_SSL_OK; | ~~~~~~~~~~~~~~~~~ 4483 | } else if (SSL_CTX_use_certificate_file(ctx, cert, 1) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4484 | MG_SET_PTRPTR(err_msg, "Invalid SSL cert"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4485 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4486 | } else if (SSL_CTX_use_PrivateKey_file(ctx, key, 1) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4487 | MG_SET_PTRPTR(err_msg, "Invalid SSL key"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4488 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4489 | } else if (SSL_CTX_use_certificate_chain_file(ctx, cert) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4490 | MG_SET_PTRPTR(err_msg, "Invalid CA bundle"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4491 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4492 | } else { | ~~~~~~~~ 4493 | SSL_CTX_set_mode(ctx, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4494 | #if !MG_DISABLE_PFS && !defined(KR_VERSION) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4495 | BIO *bio = NULL; | ~~~~~~~~~~~~~~~~ 4496 | DH *dh = NULL; | ~~~~~~~~~~~~~~ 4497 | | 4498 | /* Try to read DH parameters from the cert/key file. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4499 | bio = BIO_new_file(cert, "r"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4500 | if (bio != NULL) { | ~~~~~~~~~~~~~~~~~~ 4501 | dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4502 | BIO_free(bio); | ~~~~~~~~~~~~~~ 4503 | } | ~ 4504 | /* | ~~ 4505 | * If there are no DH params in the file, fall back to hard-coded ones. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4506 | * Not ideal, but better than nothing. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4507 | */ | ~~ 4508 | if (dh == NULL) { | ~~~~~~~~~~~~~~~~~ 4509 | bio = BIO_new_mem_buf((void *) mg_s_default_dh_params, -1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4510 | dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4511 | BIO_free(bio); | ~~~~~~~~~~~~~~ 4512 | } | ~ 4513 | if (dh != NULL) { | ~~~~~~~~~~~~~~~~~ 4514 | SSL_CTX_set_tmp_dh(ctx, dh); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4515 | SSL_CTX_set_options(ctx, SSL_OP_SINGLE_DH_USE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4516 | DH_free(dh); | ~~~~~~~~~~~~ 4517 | } | ~ 4518 | #if OPENSSL_VERSION_NUMBER > 0x10002000L | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4519 | SSL_CTX_set_ecdh_auto(ctx, 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4520 | #endif | ~~~~~~ 4521 | #endif | ~~~~~~ 4522 | } | ~ 4523 | return MG_SSL_OK; | ~~~~~~~~~~~~~~~~~ 4524 | } | ~ 4525 | | 4526 | static enum mg_ssl_if_result mg_set_cipher_list(SSL_CTX *ctx, const char *cl) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4527 | return (SSL_CTX_set_cipher_list(ctx, cl ? cl : mg_s_cipher_list) == 1 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4528 | ? MG_SSL_OK | ~~~~~~~~~~~ 4529 | : MG_SSL_ERROR); | ~~~~~~~~~~~~~~~~ 4530 | } | ~ 4531 | | 4532 | #ifndef KR_VERSION | ~~~~~~~~~~~~~~~~~~ 4533 | static unsigned int mg_ssl_if_ossl_psk_cb(SSL *ssl, const char *hint, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4534 | char *identity, | ~~~~~~~~~~~~~~~ 4535 | unsigned int max_identity_len, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4536 | unsigned char *psk, | ~~~~~~~~~~~~~~~~~~~ 4537 | unsigned int max_psk_len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4538 | struct mg_ssl_if_ctx *ctx = | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4539 | (struct mg_ssl_if_ctx *) SSL_CTX_get_app_data(SSL_get_SSL_CTX(ssl)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4540 | size_t key_len = ctx->psk.len - ctx->identity_len - 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4541 | DBG(("hint: '%s'", (hint ? hint : ""))); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4542 | if (ctx->identity_len + 1 > max_identity_len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4543 | DBG(("identity too long")); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4544 | return 0; | ~~~~~~~~~ 4545 | } | ~ 4546 | if (key_len > max_psk_len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4547 | DBG(("key too long")); | ~~~~~~~~~~~~~~~~~~~~~~ 4548 | return 0; | ~~~~~~~~~ 4549 | } | ~ 4550 | memcpy(identity, ctx->psk.buf, ctx->identity_len + 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4551 | memcpy(psk, ctx->psk.buf + ctx->identity_len + 1, key_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4552 | (void) ssl; | ~~~~~~~~~~~ 4553 | return key_len; | ~~~~~~~~~~~~~~~ 4554 | } | ~ 4555 | | 4556 | static enum mg_ssl_if_result mg_ssl_if_ossl_set_psk(struct mg_ssl_if_ctx *ctx, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4557 | const char *identity, | ~~~~~~~~~~~~~~~~~~~~~ 4558 | const char *key_str) { | ~~~~~~~~~~~~~~~~~~~~~~ 4559 | unsigned char key[32]; | ~~~~~~~~~~~~~~~~~~~~~~ 4560 | size_t key_len; | ~~~~~~~~~~~~~~~ 4561 | size_t i = 0; | ~~~~~~~~~~~~~ 4562 | if (identity == NULL && key_str == NULL) return MG_SSL_OK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4563 | if (identity == NULL || key_str == NULL) return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4564 | key_len = strlen(key_str); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4565 | if (key_len != 32 && key_len != 64) return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4566 | memset(key, 0, sizeof(key)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4567 | key_len = 0; | ~~~~~~~~~~~~ 4568 | for (i = 0; key_str[i] != '\0'; i++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4569 | unsigned char c; | ~~~~~~~~~~~~~~~~ 4570 | char hc = tolower((int) key_str[i]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4571 | if (hc >= '0' && hc <= '9') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4572 | c = hc - '0'; | ~~~~~~~~~~~~~ 4573 | } else if (hc >= 'a' && hc <= 'f') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4574 | c = hc - 'a' + 0xa; | ~~~~~~~~~~~~~~~~~~~ 4575 | } else { | ~~~~~~~~ 4576 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4577 | } | ~ 4578 | key_len = i / 2; | ~~~~~~~~~~~~~~~~ 4579 | key[key_len] <<= 4; | ~~~~~~~~~~~~~~~~~~~ 4580 | key[key_len] |= c; | ~~~~~~~~~~~~~~~~~~ 4581 | } | ~ 4582 | key_len++; | ~~~~~~~~~~ 4583 | DBG(("identity = '%s', key = (%u)", identity, (unsigned int) key_len)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4584 | ctx->identity_len = strlen(identity); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4585 | mbuf_append(&ctx->psk, identity, ctx->identity_len + 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4586 | mbuf_append(&ctx->psk, key, key_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4587 | SSL_CTX_set_psk_client_callback(ctx->ssl_ctx, mg_ssl_if_ossl_psk_cb); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4588 | SSL_CTX_set_app_data(ctx->ssl_ctx, ctx); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4589 | return MG_SSL_OK; | ~~~~~~~~~~~~~~~~~ 4590 | } | ~ 4591 | #else | ~~~~~ 4592 | static enum mg_ssl_if_result mg_ssl_if_ossl_set_psk(struct mg_ssl_if_ctx *ctx, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4593 | const char *identity, | ~~~~~~~~~~~~~~~~~~~~~ 4594 | const char *key_str) { | ~~~~~~~~~~~~~~~~~~~~~~ 4595 | (void) ctx; | ~~~~~~~~~~~ 4596 | (void) identity; | ~~~~~~~~~~~~~~~~ 4597 | (void) key_str; | ~~~~~~~~~~~~~~~ 4598 | /* Krypton does not support PSK. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4599 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4600 | } | ~ 4601 | #endif /* defined(KR_VERSION) */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4602 | | 4603 | const char *mg_set_ssl(struct mg_connection *nc, const char *cert, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4604 | const char *ca_cert) { | ~~~~~~~~~~~~~~~~~~~~~~ 4605 | const char *err_msg = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4606 | struct mg_ssl_if_conn_params params; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4607 | memset(¶ms, 0, sizeof(params)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4608 | params.cert = cert; | ~~~~~~~~~~~~~~~~~~~ 4609 | params.ca_cert = ca_cert; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 4610 | if (mg_ssl_if_conn_init(nc, ¶ms, &err_msg) != MG_SSL_OK) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4611 | return err_msg; | ~~~~~~~~~~~~~~~ 4612 | } | ~ 4613 | return NULL; | ~~~~~~~~~~~~ 4614 | } | ~ 4615 | | 4616 | #endif /* MG_ENABLE_SSL && MG_SSL_IF == MG_SSL_IF_OPENSSL */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4617 | #ifdef MG_MODULE_LINES | ~~~~~~~~~~~~~~~~~~~~~~ 4618 | #line 1 "mongoose/src/mg_ssl_if_mbedtls.c" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4619 | #endif | ~~~~~~ 4620 | /* | ~~ 4621 | * Copyright (c) 2014-2016 Cesanta Software Limited | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4622 | * All rights reserved | ~~~~~~~~~~~~~~~~~~~~~ 4623 | */ | ~~ 4624 | | 4625 | #if MG_ENABLE_SSL && MG_SSL_IF == MG_SSL_IF_MBEDTLS | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4626 | | 4627 | #include | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4628 | #include | ~~~~~~~~~~~~~~~~~~~~~~~~ 4629 | #include | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4630 | #include | ~~~~~~~~~~~~~~~~~~~~~~~~ 4631 | #include | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4632 | | 4633 | static void mg_ssl_mbed_log(void *ctx, int level, const char *file, int line, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4634 | const char *str) { | ~~~~~~~~~~~~~~~~~~ 4635 | enum cs_log_level cs_level; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4636 | switch (level) { | ~~~~~~~~~~~~~~~~ 4637 | case 1: | ~~~~~~~ 4638 | cs_level = LL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4639 | break; | ~~~~~~ 4640 | case 2: | ~~~~~~~ 4641 | case 3: | ~~~~~~~ 4642 | cs_level = LL_DEBUG; | ~~~~~~~~~~~~~~~~~~~~ 4643 | break; | ~~~~~~ 4644 | default: | ~~~~~~~~ 4645 | cs_level = LL_VERBOSE_DEBUG; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4646 | } | ~ 4647 | /* mbedTLS passes strings with \n at the end, strip it. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4648 | LOG(cs_level, ("%p %.*s", ctx, (int) (strlen(str) - 1), str)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4649 | (void) file; | ~~~~~~~~~~~~ 4650 | (void) line; | ~~~~~~~~~~~~ 4651 | } | ~ 4652 | | 4653 | struct mg_ssl_if_ctx { | ~~~~~~~~~~~~~~~~~~~~~~ 4654 | mbedtls_ssl_config *conf; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 4655 | mbedtls_ssl_context *ssl; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 4656 | mbedtls_x509_crt *cert; | ~~~~~~~~~~~~~~~~~~~~~~~ 4657 | mbedtls_pk_context *key; | ~~~~~~~~~~~~~~~~~~~~~~~~ 4658 | mbedtls_x509_crt *ca_cert; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4659 | struct mbuf cipher_suites; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4660 | }; | ~~ 4661 | | 4662 | /* Must be provided by the platform. ctx is struct mg_connection. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4663 | extern int mg_ssl_if_mbed_random(void *ctx, unsigned char *buf, size_t len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4664 | | 4665 | void mg_ssl_if_init() { | ~~~~~~~~~~~~~~~~~~~~~~~ 4666 | } | ~ 4667 | | 4668 | enum mg_ssl_if_result mg_ssl_if_conn_accept(struct mg_connection *nc, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4669 | struct mg_connection *lc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4670 | struct mg_ssl_if_ctx *ctx = | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4671 | (struct mg_ssl_if_ctx *) MG_CALLOC(1, sizeof(*ctx)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4672 | struct mg_ssl_if_ctx *lc_ctx = (struct mg_ssl_if_ctx *) lc->ssl_if_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4673 | nc->ssl_if_data = ctx; | ~~~~~~~~~~~~~~~~~~~~~~ 4674 | if (ctx == NULL || lc_ctx == NULL) return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4675 | ctx->ssl = (mbedtls_ssl_context *) MG_CALLOC(1, sizeof(*ctx->ssl)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4676 | if (mbedtls_ssl_setup(ctx->ssl, lc_ctx->conf) != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4677 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4678 | } | ~ 4679 | return MG_SSL_OK; | ~~~~~~~~~~~~~~~~~ 4680 | } | ~ 4681 | | 4682 | static enum mg_ssl_if_result mg_use_cert(struct mg_ssl_if_ctx *ctx, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4683 | const char *cert, const char *key, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4684 | const char **err_msg); | ~~~~~~~~~~~~~~~~~~~~~~ 4685 | static enum mg_ssl_if_result mg_use_ca_cert(struct mg_ssl_if_ctx *ctx, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4686 | const char *cert); | ~~~~~~~~~~~~~~~~~~ 4687 | static enum mg_ssl_if_result mg_set_cipher_list(struct mg_ssl_if_ctx *ctx, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4688 | const char *ciphers); | ~~~~~~~~~~~~~~~~~~~~~ 4689 | static enum mg_ssl_if_result mg_ssl_if_mbed_set_psk(struct mg_ssl_if_ctx *ctx, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4690 | const char *identity, | ~~~~~~~~~~~~~~~~~~~~~ 4691 | const char *key); | ~~~~~~~~~~~~~~~~~ 4692 | | 4693 | enum mg_ssl_if_result mg_ssl_if_conn_init( | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4694 | struct mg_connection *nc, const struct mg_ssl_if_conn_params *params, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4695 | const char **err_msg) { | ~~~~~~~~~~~~~~~~~~~~~~~ 4696 | struct mg_ssl_if_ctx *ctx = | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4697 | (struct mg_ssl_if_ctx *) MG_CALLOC(1, sizeof(*ctx)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4698 | DBG(("%p %s,%s,%s", nc, (params->cert ? params->cert : ""), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4699 | (params->key ? params->key : ""), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4700 | (params->ca_cert ? params->ca_cert : ""))); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4701 | | 4702 | if (ctx == NULL) { | ~~~~~~~~~~~~~~~~~~ 4703 | MG_SET_PTRPTR(err_msg, "Out of memory"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4704 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4705 | } | ~ 4706 | nc->ssl_if_data = ctx; | ~~~~~~~~~~~~~~~~~~~~~~ 4707 | ctx->conf = (mbedtls_ssl_config *) MG_CALLOC(1, sizeof(*ctx->conf)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4708 | mbuf_init(&ctx->cipher_suites, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4709 | mbedtls_ssl_config_init(ctx->conf); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4710 | mbedtls_ssl_conf_dbg(ctx->conf, mg_ssl_mbed_log, nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4711 | if (mbedtls_ssl_config_defaults( | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4712 | ctx->conf, (nc->flags & MG_F_LISTENING ? MBEDTLS_SSL_IS_SERVER | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4713 | : MBEDTLS_SSL_IS_CLIENT), | ~~~~~~~~~~~~~~~~~~~~~~~~~ 4714 | MBEDTLS_SSL_TRANSPORT_STREAM, MBEDTLS_SSL_PRESET_DEFAULT) != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4715 | MG_SET_PTRPTR(err_msg, "Failed to init SSL config"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4716 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4717 | } | ~ 4718 | | 4719 | /* TLS 1.2 and up */ | ~~~~~~~~~~~~~~~~~~~~ 4720 | mbedtls_ssl_conf_min_version(ctx->conf, MBEDTLS_SSL_MAJOR_VERSION_3, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4721 | MBEDTLS_SSL_MINOR_VERSION_3); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4722 | mbedtls_ssl_conf_rng(ctx->conf, mg_ssl_if_mbed_random, nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4723 | | 4724 | if (params->cert != NULL && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4725 | mg_use_cert(ctx, params->cert, params->key, err_msg) != MG_SSL_OK) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4726 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4727 | } | ~ 4728 | | 4729 | if (params->ca_cert != NULL && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4730 | mg_use_ca_cert(ctx, params->ca_cert) != MG_SSL_OK) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4731 | MG_SET_PTRPTR(err_msg, "Invalid SSL CA cert"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4732 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4733 | } | ~ 4734 | | 4735 | if (mg_set_cipher_list(ctx, params->cipher_suites) != MG_SSL_OK) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4736 | MG_SET_PTRPTR(err_msg, "Invalid cipher suite list"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4737 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4738 | } | ~ 4739 | | 4740 | if (mg_ssl_if_mbed_set_psk(ctx, params->psk_identity, params->psk_key) != | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4741 | MG_SSL_OK) { | ~~~~~~~~~~~~ 4742 | MG_SET_PTRPTR(err_msg, "Invalid PSK settings"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4743 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4744 | } | ~ 4745 | | 4746 | if (!(nc->flags & MG_F_LISTENING)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4747 | ctx->ssl = (mbedtls_ssl_context *) MG_CALLOC(1, sizeof(*ctx->ssl)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4748 | mbedtls_ssl_init(ctx->ssl); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4749 | if (mbedtls_ssl_setup(ctx->ssl, ctx->conf) != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4750 | MG_SET_PTRPTR(err_msg, "Failed to create SSL session"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4751 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4752 | } | ~ 4753 | if (params->server_name != NULL && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4754 | mbedtls_ssl_set_hostname(ctx->ssl, params->server_name) != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4755 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4756 | } | ~ 4757 | } | ~ 4758 | | 4759 | #ifdef MG_SSL_IF_MBEDTLS_MAX_FRAG_LEN | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4760 | if (mbedtls_ssl_conf_max_frag_len(ctx->conf, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4761 | #if MG_SSL_IF_MBEDTLS_MAX_FRAG_LEN == 512 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4762 | MBEDTLS_SSL_MAX_FRAG_LEN_512 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4763 | #elif MG_SSL_IF_MBEDTLS_MAX_FRAG_LEN == 1024 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4764 | MBEDTLS_SSL_MAX_FRAG_LEN_1024 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4765 | #elif MG_SSL_IF_MBEDTLS_MAX_FRAG_LEN == 2048 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4766 | MBEDTLS_SSL_MAX_FRAG_LEN_2048 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4767 | #elif MG_SSL_IF_MBEDTLS_MAX_FRAG_LEN == 4096 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4768 | MBEDTLS_SSL_MAX_FRAG_LEN_4096 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4769 | #else | ~~~~~ 4770 | #error Invalid MG_SSL_IF_MBEDTLS_MAX_FRAG_LEN | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4771 | #endif | ~~~~~~ 4772 | ) != 0) { | ~~~~~~~~~ 4773 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4774 | } | ~ 4775 | #endif | ~~~~~~ 4776 | | 4777 | nc->flags |= MG_F_SSL; | ~~~~~~~~~~~~~~~~~~~~~~ 4778 | | 4779 | return MG_SSL_OK; | ~~~~~~~~~~~~~~~~~ 4780 | } | ~ 4781 | | 4782 | #if MG_NET_IF == MG_NET_IF_LWIP_LOW_LEVEL | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4783 | int ssl_socket_send(void *ctx, const unsigned char *buf, size_t len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4784 | int ssl_socket_recv(void *ctx, unsigned char *buf, size_t len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4785 | #else | ~~~~~ 4786 | static int ssl_socket_send(void *ctx, const unsigned char *buf, size_t len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4787 | struct mg_connection *nc = (struct mg_connection *) ctx; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4788 | int n = (int) MG_SEND_FUNC(nc->sock, buf, len, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4789 | LOG(LL_DEBUG, ("%p %d -> %d", nc, (int) len, n)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4790 | if (n >= 0) return n; | ~~~~~~~~~~~~~~~~~~~~~ 4791 | n = mg_get_errno(); | ~~~~~~~~~~~~~~~~~~~ 4792 | return ((n == EAGAIN || n == EINPROGRESS) ? MBEDTLS_ERR_SSL_WANT_WRITE : -1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4793 | } | ~ 4794 | | 4795 | static int ssl_socket_recv(void *ctx, unsigned char *buf, size_t len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4796 | struct mg_connection *nc = (struct mg_connection *) ctx; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4797 | int n = (int) MG_RECV_FUNC(nc->sock, buf, len, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4798 | LOG(LL_DEBUG, ("%p %d <- %d", nc, (int) len, n)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4799 | if (n >= 0) return n; | ~~~~~~~~~~~~~~~~~~~~~ 4800 | n = mg_get_errno(); | ~~~~~~~~~~~~~~~~~~~ 4801 | return ((n == EAGAIN || n == EINPROGRESS) ? MBEDTLS_ERR_SSL_WANT_READ : -1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4802 | } | ~ 4803 | #endif | ~~~~~~ 4804 | | 4805 | static enum mg_ssl_if_result mg_ssl_if_mbed_err(struct mg_connection *nc, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4806 | int ret) { | ~~~~~~~~~~ 4807 | if (ret == MBEDTLS_ERR_SSL_WANT_READ) return MG_SSL_WANT_READ; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4808 | if (ret == MBEDTLS_ERR_SSL_WANT_WRITE) return MG_SSL_WANT_WRITE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4809 | if (ret != | ~~~~~~~~~~ 4810 | MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY) { /* CLOSE_NOTIFY = Normal shutdown */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4811 | LOG(LL_ERROR, ("%p SSL error: %d", nc, ret)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4812 | } | ~ 4813 | nc->err = ret; | ~~~~~~~~~~~~~~ 4814 | nc->flags |= MG_F_CLOSE_IMMEDIATELY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4815 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4816 | } | ~ 4817 | | 4818 | static void mg_ssl_if_mbed_free_certs_and_keys(struct mg_ssl_if_ctx *ctx) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4819 | if (ctx->cert != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~ 4820 | mbedtls_x509_crt_free(ctx->cert); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4821 | MG_FREE(ctx->cert); | ~~~~~~~~~~~~~~~~~~~ 4822 | ctx->cert = NULL; | ~~~~~~~~~~~~~~~~~ 4823 | mbedtls_pk_free(ctx->key); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4824 | MG_FREE(ctx->key); | ~~~~~~~~~~~~~~~~~~ 4825 | ctx->key = NULL; | ~~~~~~~~~~~~~~~~ 4826 | } | ~ 4827 | if (ctx->ca_cert != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4828 | mbedtls_ssl_conf_ca_chain(ctx->conf, NULL, NULL); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4829 | #ifdef MBEDTLS_X509_CA_CHAIN_ON_DISK | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4830 | if (ctx->ca_cert->ca_chain_file != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4831 | MG_FREE((void *) ctx->ca_cert->ca_chain_file); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4832 | ctx->ca_cert->ca_chain_file = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4833 | } | ~ 4834 | #endif | ~~~~~~ 4835 | mbedtls_x509_crt_free(ctx->ca_cert); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4836 | MG_FREE(ctx->ca_cert); | ~~~~~~~~~~~~~~~~~~~~~~ 4837 | ctx->ca_cert = NULL; | ~~~~~~~~~~~~~~~~~~~~ 4838 | } | ~ 4839 | } | ~ 4840 | | 4841 | enum mg_ssl_if_result mg_ssl_if_handshake(struct mg_connection *nc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4842 | struct mg_ssl_if_ctx *ctx = (struct mg_ssl_if_ctx *) nc->ssl_if_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4843 | int err; | ~~~~~~~~ 4844 | /* If bio is not yet set, do it now. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4845 | if (ctx->ssl->p_bio == NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4846 | mbedtls_ssl_set_bio(ctx->ssl, nc, ssl_socket_send, ssl_socket_recv, NULL); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4847 | } | ~ 4848 | err = mbedtls_ssl_handshake(ctx->ssl); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4849 | if (err != 0) return mg_ssl_if_mbed_err(nc, err); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4850 | #ifdef MG_SSL_IF_MBEDTLS_FREE_CERTS | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4851 | /* | ~~ 4852 | * Free the peer certificate, we don't need it after handshake. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4853 | * Note that this effectively disables renegotiation. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4854 | */ | ~~ 4855 | mbedtls_x509_crt_free(ctx->ssl->session->peer_cert); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4856 | mbedtls_free(ctx->ssl->session->peer_cert); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4857 | ctx->ssl->session->peer_cert = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4858 | /* On a client connection we can also free our own and CA certs. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4859 | if (nc->listener == NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4860 | if (ctx->conf->key_cert != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4861 | /* Note that this assumes one key_cert entry, which matches our init. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4862 | MG_FREE(ctx->conf->key_cert); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4863 | ctx->conf->key_cert = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4864 | } | ~ 4865 | mbedtls_ssl_conf_ca_chain(ctx->conf, NULL, NULL); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4866 | mg_ssl_if_mbed_free_certs_and_keys(ctx); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4867 | } | ~ 4868 | #endif | ~~~~~~ 4869 | return MG_SSL_OK; | ~~~~~~~~~~~~~~~~~ 4870 | } | ~ 4871 | | 4872 | int mg_ssl_if_read(struct mg_connection *nc, void *buf, size_t buf_size) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4873 | struct mg_ssl_if_ctx *ctx = (struct mg_ssl_if_ctx *) nc->ssl_if_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4874 | int n = mbedtls_ssl_read(ctx->ssl, (unsigned char *) buf, buf_size); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4875 | DBG(("%p %d -> %d", nc, (int) buf_size, n)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4876 | if (n < 0) return mg_ssl_if_mbed_err(nc, n); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4877 | if (n == 0) nc->flags |= MG_F_CLOSE_IMMEDIATELY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4878 | return n; | ~~~~~~~~~ 4879 | } | ~ 4880 | | 4881 | int mg_ssl_if_write(struct mg_connection *nc, const void *data, size_t len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4882 | struct mg_ssl_if_ctx *ctx = (struct mg_ssl_if_ctx *) nc->ssl_if_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4883 | int n = mbedtls_ssl_write(ctx->ssl, (const unsigned char *) data, len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4884 | DBG(("%p %d -> %d", nc, (int) len, n)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4885 | if (n < 0) return mg_ssl_if_mbed_err(nc, n); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4886 | return n; | ~~~~~~~~~ 4887 | } | ~ 4888 | | 4889 | void mg_ssl_if_conn_close_notify(struct mg_connection *nc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4890 | struct mg_ssl_if_ctx *ctx = (struct mg_ssl_if_ctx *) nc->ssl_if_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4891 | if (ctx == NULL) return; | ~~~~~~~~~~~~~~~~~~~~~~~~ 4892 | mbedtls_ssl_close_notify(ctx->ssl); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4893 | } | ~ 4894 | | 4895 | void mg_ssl_if_conn_free(struct mg_connection *nc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4896 | struct mg_ssl_if_ctx *ctx = (struct mg_ssl_if_ctx *) nc->ssl_if_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4897 | if (ctx == NULL) return; | ~~~~~~~~~~~~~~~~~~~~~~~~ 4898 | nc->ssl_if_data = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~ 4899 | if (ctx->ssl != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~ 4900 | mbedtls_ssl_free(ctx->ssl); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4901 | MG_FREE(ctx->ssl); | ~~~~~~~~~~~~~~~~~~ 4902 | } | ~ 4903 | mg_ssl_if_mbed_free_certs_and_keys(ctx); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4904 | if (ctx->conf != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~ 4905 | mbedtls_ssl_config_free(ctx->conf); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4906 | MG_FREE(ctx->conf); | ~~~~~~~~~~~~~~~~~~~ 4907 | } | ~ 4908 | mbuf_free(&ctx->cipher_suites); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4909 | memset(ctx, 0, sizeof(*ctx)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4910 | MG_FREE(ctx); | ~~~~~~~~~~~~~ 4911 | } | ~ 4912 | | 4913 | static enum mg_ssl_if_result mg_use_ca_cert(struct mg_ssl_if_ctx *ctx, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4914 | const char *ca_cert) { | ~~~~~~~~~~~~~~~~~~~~~~ 4915 | if (ca_cert == NULL || strcmp(ca_cert, "*") == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4916 | mbedtls_ssl_conf_authmode(ctx->conf, MBEDTLS_SSL_VERIFY_NONE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4917 | return MG_SSL_OK; | ~~~~~~~~~~~~~~~~~ 4918 | } | ~ 4919 | ctx->ca_cert = (mbedtls_x509_crt *) MG_CALLOC(1, sizeof(*ctx->ca_cert)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4920 | mbedtls_x509_crt_init(ctx->ca_cert); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4921 | #ifdef MBEDTLS_X509_CA_CHAIN_ON_DISK | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4922 | ca_cert = strdup(ca_cert); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4923 | if (mbedtls_x509_crt_set_ca_chain_file(ctx->ca_cert, ca_cert) != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4924 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4925 | } | ~ 4926 | #else | ~~~~~ 4927 | if (mbedtls_x509_crt_parse_file(ctx->ca_cert, ca_cert) != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4928 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4929 | } | ~ 4930 | #endif | ~~~~~~ 4931 | mbedtls_ssl_conf_ca_chain(ctx->conf, ctx->ca_cert, NULL); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4932 | mbedtls_ssl_conf_authmode(ctx->conf, MBEDTLS_SSL_VERIFY_REQUIRED); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4933 | return MG_SSL_OK; | ~~~~~~~~~~~~~~~~~ 4934 | } | ~ 4935 | | 4936 | static enum mg_ssl_if_result mg_use_cert(struct mg_ssl_if_ctx *ctx, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4937 | const char *cert, const char *key, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4938 | const char **err_msg) { | ~~~~~~~~~~~~~~~~~~~~~~~ 4939 | if (key == NULL) key = cert; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4940 | if (cert == NULL || cert[0] == '\0' || key == NULL || key[0] == '\0') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4941 | return MG_SSL_OK; | ~~~~~~~~~~~~~~~~~ 4942 | } | ~ 4943 | ctx->cert = (mbedtls_x509_crt *) MG_CALLOC(1, sizeof(*ctx->cert)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4944 | mbedtls_x509_crt_init(ctx->cert); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4945 | ctx->key = (mbedtls_pk_context *) MG_CALLOC(1, sizeof(*ctx->key)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4946 | mbedtls_pk_init(ctx->key); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4947 | if (mbedtls_x509_crt_parse_file(ctx->cert, cert) != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4948 | MG_SET_PTRPTR(err_msg, "Invalid SSL cert"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4949 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4950 | } | ~ 4951 | if (mbedtls_pk_parse_keyfile(ctx->key, key, NULL) != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4952 | MG_SET_PTRPTR(err_msg, "Invalid SSL key"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4953 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4954 | } | ~ 4955 | if (mbedtls_ssl_conf_own_cert(ctx->conf, ctx->cert, ctx->key) != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4956 | MG_SET_PTRPTR(err_msg, "Invalid SSL key or cert"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4957 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 4958 | } | ~ 4959 | return MG_SSL_OK; | ~~~~~~~~~~~~~~~~~ 4960 | } | ~ 4961 | | 4962 | static const int mg_s_cipher_list[] = { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4963 | #if CS_PLATFORM != CS_P_ESP8266 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4964 | MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4965 | MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4966 | MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4967 | MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4968 | MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4969 | MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4970 | MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4971 | MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4972 | MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4973 | MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4974 | MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4975 | MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4976 | MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4977 | MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4978 | MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4979 | #else | ~~~~~ 4980 | /* | ~~ 4981 | * ECDHE is way too slow on ESP8266 w/o cryptochip, this sometimes results | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4982 | * in WiFi STA deauths. Use weaker but faster cipher suites. Sad but true. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4983 | * Disable DHE completely because it's just hopelessly slow. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4984 | */ | ~~ 4985 | MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4986 | MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4987 | MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4988 | MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4989 | MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4990 | MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4991 | MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4992 | MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4993 | MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4994 | MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4995 | MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4996 | MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4997 | MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4998 | #endif /* CS_PLATFORM != CS_P_ESP8266 */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4999 | 0, | ~~ 5000 | }; | ~~ 5001 | | 5002 | /* | ~~ 5003 | * Ciphers can be specified as a colon-separated list of cipher suite names. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5004 | * These can be found in | ~~~~~~~~~~~~~~~~~~~~~~~ 5005 | * https://github.com/ARMmbed/mbedtls/blob/development/library/ssl_ciphersuites.c#L267 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5006 | * E.g.: TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-256-CCM | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5007 | */ | ~~ 5008 | static enum mg_ssl_if_result mg_set_cipher_list(struct mg_ssl_if_ctx *ctx, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5009 | const char *ciphers) { | ~~~~~~~~~~~~~~~~~~~~~~ 5010 | if (ciphers != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~ 5011 | int l, id; | ~~~~~~~~~~ 5012 | const char *s = ciphers, *e; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5013 | char tmp[50]; | ~~~~~~~~~~~~~ 5014 | while (s != NULL) { | ~~~~~~~~~~~~~~~~~~~ 5015 | e = strchr(s, ':'); | ~~~~~~~~~~~~~~~~~~~ 5016 | l = (e != NULL ? (e - s) : (int) strlen(s)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5017 | strncpy(tmp, s, l); | ~~~~~~~~~~~~~~~~~~~ 5018 | tmp[l] = '\0'; | ~~~~~~~~~~~~~~ 5019 | id = mbedtls_ssl_get_ciphersuite_id(tmp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5020 | DBG(("%s -> %04x", tmp, id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5021 | if (id != 0) { | ~~~~~~~~~~~~~~ 5022 | mbuf_append(&ctx->cipher_suites, &id, sizeof(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5023 | } | ~ 5024 | s = (e != NULL ? e + 1 : NULL); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5025 | } | ~ 5026 | if (ctx->cipher_suites.len == 0) return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5027 | id = 0; | ~~~~~~~ 5028 | mbuf_append(&ctx->cipher_suites, &id, sizeof(id)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5029 | mbuf_trim(&ctx->cipher_suites); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5030 | mbedtls_ssl_conf_ciphersuites(ctx->conf, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5031 | (const int *) ctx->cipher_suites.buf); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5032 | } else { | ~~~~~~~~ 5033 | mbedtls_ssl_conf_ciphersuites(ctx->conf, mg_s_cipher_list); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5034 | } | ~ 5035 | return MG_SSL_OK; | ~~~~~~~~~~~~~~~~~ 5036 | } | ~ 5037 | | 5038 | static enum mg_ssl_if_result mg_ssl_if_mbed_set_psk(struct mg_ssl_if_ctx *ctx, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5039 | const char *identity, | ~~~~~~~~~~~~~~~~~~~~~ 5040 | const char *key_str) { | ~~~~~~~~~~~~~~~~~~~~~~ 5041 | unsigned char key[32]; | ~~~~~~~~~~~~~~~~~~~~~~ 5042 | size_t key_len; | ~~~~~~~~~~~~~~~ 5043 | if (identity == NULL && key_str == NULL) return MG_SSL_OK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5044 | if (identity == NULL || key_str == NULL) return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5045 | key_len = strlen(key_str); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 5046 | if (key_len != 32 && key_len != 64) return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5047 | size_t i = 0; | ~~~~~~~~~~~~~ 5048 | memset(key, 0, sizeof(key)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5049 | key_len = 0; | ~~~~~~~~~~~~ 5050 | for (i = 0; key_str[i] != '\0'; i++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5051 | unsigned char c; | ~~~~~~~~~~~~~~~~ 5052 | char hc = tolower((int) key_str[i]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5053 | if (hc >= '0' && hc <= '9') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5054 | c = hc - '0'; | ~~~~~~~~~~~~~ 5055 | } else if (hc >= 'a' && hc <= 'f') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5056 | c = hc - 'a' + 0xa; | ~~~~~~~~~~~~~~~~~~~ 5057 | } else { | ~~~~~~~~ 5058 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 5059 | } | ~ 5060 | key_len = i / 2; | ~~~~~~~~~~~~~~~~ 5061 | key[key_len] <<= 4; | ~~~~~~~~~~~~~~~~~~~ 5062 | key[key_len] |= c; | ~~~~~~~~~~~~~~~~~~ 5063 | } | ~ 5064 | key_len++; | ~~~~~~~~~~ 5065 | DBG(("identity = '%s', key = (%u)", identity, (unsigned int) key_len)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5066 | /* mbedTLS makes copies of psk and identity. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5067 | if (mbedtls_ssl_conf_psk(ctx->conf, (const unsigned char *) key, key_len, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5068 | (const unsigned char *) identity, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5069 | strlen(identity)) != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~ 5070 | return MG_SSL_ERROR; | ~~~~~~~~~~~~~~~~~~~~ 5071 | } | ~ 5072 | return MG_SSL_OK; | ~~~~~~~~~~~~~~~~~ 5073 | } | ~ 5074 | | 5075 | const char *mg_set_ssl(struct mg_connection *nc, const char *cert, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5076 | const char *ca_cert) { | ~~~~~~~~~~~~~~~~~~~~~~ 5077 | const char *err_msg = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5078 | struct mg_ssl_if_conn_params params; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5079 | memset(¶ms, 0, sizeof(params)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5080 | params.cert = cert; | ~~~~~~~~~~~~~~~~~~~ 5081 | params.ca_cert = ca_cert; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 5082 | if (mg_ssl_if_conn_init(nc, ¶ms, &err_msg) != MG_SSL_OK) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5083 | return err_msg; | ~~~~~~~~~~~~~~~ 5084 | } | ~ 5085 | return NULL; | ~~~~~~~~~~~~ 5086 | } | ~ 5087 | | 5088 | /* Lazy RNG. Warning: it would be a bad idea to do this in production! */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5089 | #ifdef MG_SSL_MBED_DUMMY_RANDOM | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5090 | int mg_ssl_if_mbed_random(void *ctx, unsigned char *buf, size_t len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5091 | (void) ctx; | ~~~~~~~~~~~ 5092 | while (len--) *buf++ = rand(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5093 | return 0; | ~~~~~~~~~ 5094 | } | ~ 5095 | #endif | ~~~~~~ 5096 | | 5097 | #endif /* MG_ENABLE_SSL && MG_SSL_IF == MG_SSL_IF_MBEDTLS */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5098 | #ifdef MG_MODULE_LINES | ~~~~~~~~~~~~~~~~~~~~~~ 5099 | #line 1 "mongoose/src/mg_uri.c" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5100 | #endif | ~~~~~~ 5101 | /* | ~~ 5102 | * Copyright (c) 2014 Cesanta Software Limited | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5103 | * All rights reserved | ~~~~~~~~~~~~~~~~~~~~~ 5104 | */ | ~~ 5105 | | 5106 | /* Amalgamated: #include "mg_internal.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5107 | /* Amalgamated: #include "mg_uri.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5108 | | 5109 | /* | ~~ 5110 | * scan string until encountering one of `seps`, keeping track of component | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5111 | * boundaries in `res`. | ~~~~~~~~~~~~~~~~~~~~~~ 5112 | * | ~ 5113 | * `p` will point to the char after the separator or it will be `end`. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5114 | */ | ~~ 5115 | static void parse_uri_component(const char **p, const char *end, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5116 | const char *seps, struct mg_str *res) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5117 | const char *q; | ~~~~~~~~~~~~~~ 5118 | res->p = *p; | ~~~~~~~~~~~~ 5119 | for (; *p < end; (*p)++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 5120 | for (q = seps; *q != '\0'; q++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5121 | if (**p == *q) break; | ~~~~~~~~~~~~~~~~~~~~~ 5122 | } | ~ 5123 | if (*q != '\0') break; | ~~~~~~~~~~~~~~~~~~~~~~ 5124 | } | ~ 5125 | res->len = (*p) - res->p; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 5126 | if (*p < end) (*p)++; | ~~~~~~~~~~~~~~~~~~~~~ 5127 | } | ~ 5128 | | 5129 | int mg_parse_uri(const struct mg_str uri, struct mg_str *scheme, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5130 | struct mg_str *user_info, struct mg_str *host, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5131 | unsigned int *port, struct mg_str *path, struct mg_str *query, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5132 | struct mg_str *fragment) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 5133 | struct mg_str rscheme = {0, 0}, ruser_info = {0, 0}, rhost = {0, 0}, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5134 | rpath = {0, 0}, rquery = {0, 0}, rfragment = {0, 0}; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5135 | unsigned int rport = 0; | ~~~~~~~~~~~~~~~~~~~~~~~ 5136 | enum { | ~~~~~~ 5137 | P_START, | ~~~~~~~~ 5138 | P_SCHEME_OR_PORT, | ~~~~~~~~~~~~~~~~~ 5139 | P_USER_INFO, | ~~~~~~~~~~~~ 5140 | P_HOST, | ~~~~~~~ 5141 | P_PORT, | ~~~~~~~ 5142 | P_REST | ~~~~~~ 5143 | } state = P_START; | ~~~~~~~~~~~~~~~~~~ 5144 | | 5145 | const char *p = uri.p, *end = p + uri.len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5146 | while (p < end) { | ~~~~~~~~~~~~~~~~~ 5147 | switch (state) { | ~~~~~~~~~~~~~~~~ 5148 | case P_START: | ~~~~~~~~~~~~~ 5149 | /* | ~~ 5150 | * expecting on of: | ~~~~~~~~~~~~~~~~~~ 5151 | * - `scheme://xxxx` | ~~~~~~~~~~~~~~~~~~~ 5152 | * - `xxxx:port` | ~~~~~~~~~~~~~~~ 5153 | * - `[a:b:c]:port` | ~~~~~~~~~~~~~~~~~~ 5154 | * - `xxxx/path` | ~~~~~~~~~~~~~~~ 5155 | */ | ~~ 5156 | if (*p == '[') { | ~~~~~~~~~~~~~~~~ 5157 | state = P_HOST; | ~~~~~~~~~~~~~~~ 5158 | break; | ~~~~~~ 5159 | } | ~ 5160 | for (; p < end; p++) { | ~~~~~~~~~~~~~~~~~~~~~~ 5161 | if (*p == ':') { | ~~~~~~~~~~~~~~~~ 5162 | state = P_SCHEME_OR_PORT; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 5163 | break; | ~~~~~~ 5164 | } else if (*p == '/') { | ~~~~~~~~~~~~~~~~~~~~~~~ 5165 | state = P_REST; | ~~~~~~~~~~~~~~~ 5166 | break; | ~~~~~~ 5167 | } | ~ 5168 | } | ~ 5169 | if (state == P_START || state == P_REST) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5170 | rhost.p = uri.p; | ~~~~~~~~~~~~~~~~ 5171 | rhost.len = p - uri.p; | ~~~~~~~~~~~~~~~~~~~~~~ 5172 | } | ~ 5173 | break; | ~~~~~~ 5174 | case P_SCHEME_OR_PORT: | ~~~~~~~~~~~~~~~~~~~~~~ 5175 | if (end - p >= 3 && strncmp(p, "://", 3) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5176 | rscheme.p = uri.p; | ~~~~~~~~~~~~~~~~~~ 5177 | rscheme.len = p - uri.p; | ~~~~~~~~~~~~~~~~~~~~~~~~ 5178 | state = P_USER_INFO; | ~~~~~~~~~~~~~~~~~~~~ 5179 | p += 3; | ~~~~~~~ 5180 | } else { | ~~~~~~~~ 5181 | rhost.p = uri.p; | ~~~~~~~~~~~~~~~~ 5182 | rhost.len = p - uri.p; | ~~~~~~~~~~~~~~~~~~~~~~ 5183 | state = P_PORT; | ~~~~~~~~~~~~~~~ 5184 | } | ~ 5185 | break; | ~~~~~~ 5186 | case P_USER_INFO: | ~~~~~~~~~~~~~~~~~ 5187 | ruser_info.p = p; | ~~~~~~~~~~~~~~~~~ 5188 | for (; p < end; p++) { | ~~~~~~~~~~~~~~~~~~~~~~ 5189 | if (*p == '@' || *p == '[' || *p == '/') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5190 | break; | ~~~~~~ 5191 | } | ~ 5192 | } | ~ 5193 | if (p == end || *p == '/' || *p == '[') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5194 | /* backtrack and parse as host */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5195 | p = ruser_info.p; | ~~~~~~~~~~~~~~~~~ 5196 | } | ~ 5197 | ruser_info.len = p - ruser_info.p; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5198 | state = P_HOST; | ~~~~~~~~~~~~~~~ 5199 | break; | ~~~~~~ 5200 | case P_HOST: | ~~~~~~~~~~~~ 5201 | if (*p == '@') p++; | ~~~~~~~~~~~~~~~~~~~ 5202 | rhost.p = p; | ~~~~~~~~~~~~ 5203 | if (*p == '[') { | ~~~~~~~~~~~~~~~~ 5204 | int found = 0; | ~~~~~~~~~~~~~~ 5205 | for (; !found && p < end; p++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5206 | found = (*p == ']'); | ~~~~~~~~~~~~~~~~~~~~ 5207 | } | ~ 5208 | if (!found) return -1; | ~~~~~~~~~~~~~~~~~~~~~~ 5209 | } else { | ~~~~~~~~ 5210 | for (; p < end; p++) { | ~~~~~~~~~~~~~~~~~~~~~~ 5211 | if (*p == ':' || *p == '/') break; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5212 | } | ~ 5213 | } | ~ 5214 | rhost.len = p - rhost.p; | ~~~~~~~~~~~~~~~~~~~~~~~~ 5215 | if (p < end) { | ~~~~~~~~~~~~~~ 5216 | if (*p == ':') { | ~~~~~~~~~~~~~~~~ 5217 | state = P_PORT; | ~~~~~~~~~~~~~~~ 5218 | break; | ~~~~~~ 5219 | } else if (*p == '/') { | ~~~~~~~~~~~~~~~~~~~~~~~ 5220 | state = P_REST; | ~~~~~~~~~~~~~~~ 5221 | break; | ~~~~~~ 5222 | } | ~ 5223 | } | ~ 5224 | break; | ~~~~~~ 5225 | case P_PORT: | ~~~~~~~~~~~~ 5226 | p++; | ~~~~ 5227 | for (; p < end; p++) { | ~~~~~~~~~~~~~~~~~~~~~~ 5228 | if (*p == '/') { | ~~~~~~~~~~~~~~~~ 5229 | state = P_REST; | ~~~~~~~~~~~~~~~ 5230 | break; | ~~~~~~ 5231 | } | ~ 5232 | rport *= 10; | ~~~~~~~~~~~~ 5233 | rport += *p - '0'; | ~~~~~~~~~~~~~~~~~~ 5234 | } | ~ 5235 | break; | ~~~~~~ 5236 | case P_REST: | ~~~~~~~~~~~~ 5237 | /* `p` points to separator. `path` includes the separator */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5238 | parse_uri_component(&p, end, "?#", &rpath); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5239 | if (p < end && *(p - 1) == '?') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5240 | parse_uri_component(&p, end, "#", &rquery); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5241 | } | ~ 5242 | parse_uri_component(&p, end, "", &rfragment); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5243 | break; | ~~~~~~ 5244 | } | ~ 5245 | } | ~ 5246 | | 5247 | if (scheme != 0) *scheme = rscheme; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5248 | if (user_info != 0) *user_info = ruser_info; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5249 | if (host != 0) *host = rhost; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5250 | if (port != 0) *port = rport; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5251 | if (path != 0) *path = rpath; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5252 | if (query != 0) *query = rquery; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5253 | if (fragment != 0) *fragment = rfragment; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5254 | | 5255 | return 0; | ~~~~~~~~~ 5256 | } | ~ 5257 | | 5258 | /* Normalize the URI path. Remove/resolve "." and "..". */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5259 | int mg_normalize_uri_path(const struct mg_str *in, struct mg_str *out) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5260 | const char *s = in->p, *se = s + in->len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5261 | char *cp = (char *) out->p, *d; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5262 | | 5263 | if (in->len == 0 || *s != '/') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5264 | out->len = 0; | ~~~~~~~~~~~~~ 5265 | return 0; | ~~~~~~~~~ 5266 | } | ~ 5267 | | 5268 | d = cp; | ~~~~~~~ 5269 | | 5270 | while (s < se) { | ~~~~~~~~~~~~~~~~ 5271 | const char *next = s; | ~~~~~~~~~~~~~~~~~~~~~ 5272 | struct mg_str component; | ~~~~~~~~~~~~~~~~~~~~~~~~ 5273 | parse_uri_component(&next, se, "/", &component); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5274 | if (mg_vcmp(&component, ".") == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5275 | /* Yum. */ | ~~~~~~~~~~ 5276 | } else if (mg_vcmp(&component, "..") == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5277 | /* Backtrack to previous slash. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5278 | if (d > cp + 1 && *(d - 1) == '/') d--; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5279 | while (d > cp && *(d - 1) != '/') d--; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5280 | } else { | ~~~~~~~~ 5281 | memmove(d, s, next - s); | ~~~~~~~~~~~~~~~~~~~~~~~~ 5282 | d += next - s; | ~~~~~~~~~~~~~~ 5283 | } | ~ 5284 | s = next; | ~~~~~~~~~ 5285 | } | ~ 5286 | if (d == cp) *d++ = '/'; | ~~~~~~~~~~~~~~~~~~~~~~~~ 5287 | | 5288 | out->p = cp; | ~~~~~~~~~~~~ 5289 | out->len = d - cp; | ~~~~~~~~~~~~~~~~~~ 5290 | return 1; | ~~~~~~~~~ 5291 | } | ~ 5292 | | 5293 | int mg_assemble_uri(const struct mg_str *scheme, const struct mg_str *user_info, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5294 | const struct mg_str *host, unsigned int port, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5295 | const struct mg_str *path, const struct mg_str *query, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5296 | const struct mg_str *fragment, int normalize_path, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5297 | struct mg_str *uri) { | ~~~~~~~~~~~~~~~~~~~~~ 5298 | int result = -1; | ~~~~~~~~~~~~~~~~ 5299 | struct mbuf out; | ~~~~~~~~~~~~~~~~ 5300 | mbuf_init(&out, 0); | ~~~~~~~~~~~~~~~~~~~ 5301 | | 5302 | if (scheme != NULL && scheme->len > 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5303 | mbuf_append(&out, scheme->p, scheme->len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5304 | mbuf_append(&out, "://", 3); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5305 | } | ~ 5306 | | 5307 | if (user_info != NULL && user_info->len > 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5308 | mbuf_append(&out, user_info->p, user_info->len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5309 | mbuf_append(&out, "@", 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 5310 | } | ~ 5311 | | 5312 | if (host != NULL && host->len > 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5313 | mbuf_append(&out, host->p, host->len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5314 | } | ~ 5315 | | 5316 | if (port != 0) { | ~~~~~~~~~~~~~~~~ 5317 | char port_str[20]; | ~~~~~~~~~~~~~~~~~~ 5318 | int port_str_len = sprintf(port_str, ":%u", port); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5319 | mbuf_append(&out, port_str, port_str_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5320 | } | ~ 5321 | | 5322 | if (path != NULL && path->len > 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5323 | if (normalize_path) { | ~~~~~~~~~~~~~~~~~~~~~ 5324 | struct mg_str npath = mg_strdup(*path); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5325 | if (npath.len != path->len) goto out; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5326 | if (!mg_normalize_uri_path(path, &npath)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5327 | free((void *) npath.p); | ~~~~~~~~~~~~~~~~~~~~~~~ 5328 | goto out; | ~~~~~~~~~ 5329 | } | ~ 5330 | mbuf_append(&out, npath.p, npath.len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5331 | free((void *) npath.p); | ~~~~~~~~~~~~~~~~~~~~~~~ 5332 | } else { | ~~~~~~~~ 5333 | mbuf_append(&out, path->p, path->len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5334 | } | ~ 5335 | } else if (normalize_path) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5336 | mbuf_append(&out, "/", 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 5337 | } | ~ 5338 | | 5339 | if (query != NULL && query->len > 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5340 | mbuf_append(&out, "?", 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 5341 | mbuf_append(&out, query->p, query->len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5342 | } | ~ 5343 | | 5344 | if (fragment != NULL && fragment->len > 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5345 | mbuf_append(&out, "#", 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 5346 | mbuf_append(&out, fragment->p, fragment->len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5347 | } | ~ 5348 | | 5349 | result = 0; | ~~~~~~~~~~~ 5350 | | 5351 | out: | ~~~~ 5352 | if (result == 0) { | ~~~~~~~~~~~~~~~~~~ 5353 | uri->p = out.buf; | ~~~~~~~~~~~~~~~~~ 5354 | uri->len = out.len; | ~~~~~~~~~~~~~~~~~~~ 5355 | } else { | ~~~~~~~~ 5356 | mbuf_free(&out); | ~~~~~~~~~~~~~~~~ 5357 | uri->p = NULL; | ~~~~~~~~~~~~~~ 5358 | uri->len = 0; | ~~~~~~~~~~~~~ 5359 | } | ~ 5360 | return result; | ~~~~~~~~~~~~~~ 5361 | } | ~ 5362 | #ifdef MG_MODULE_LINES | ~~~~~~~~~~~~~~~~~~~~~~ 5363 | #line 1 "mongoose/src/mg_http.c" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5364 | #endif | ~~~~~~ 5365 | /* | ~~ 5366 | * Copyright (c) 2014 Cesanta Software Limited | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5367 | * All rights reserved | ~~~~~~~~~~~~~~~~~~~~~ 5368 | */ | ~~ 5369 | | 5370 | #if MG_ENABLE_HTTP | ~~~~~~~~~~~~~~~~~~ 5371 | | 5372 | /* Amalgamated: #include "common/cs_md5.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5373 | /* Amalgamated: #include "mg_internal.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5374 | /* Amalgamated: #include "mg_util.h" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5375 | | 5376 | /* altbuf {{{ */ | ~~~~~~~~~~~~~~~~ 5377 | | 5378 | /* | ~~ 5379 | * Alternate buffer: fills the client-provided buffer with data; and if it's | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5380 | * not large enough, allocates another buffer (via mbuf), similar to asprintf. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5381 | */ | ~~ 5382 | struct altbuf { | ~~~~~~~~~~~~~~~ 5383 | struct mbuf m; | ~~~~~~~~~~~~~~ 5384 | char *user_buf; | ~~~~~~~~~~~~~~~ 5385 | size_t len; | ~~~~~~~~~~~ 5386 | size_t user_buf_size; | ~~~~~~~~~~~~~~~~~~~~~ 5387 | }; | ~~ 5388 | | 5389 | /* | ~~ 5390 | * Initializes altbuf; `buf`, `buf_size` is the client-provided buffer. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5391 | */ | ~~ 5392 | MG_INTERNAL void altbuf_init(struct altbuf *ab, char *buf, size_t buf_size) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5393 | mbuf_init(&ab->m, 0); | ~~~~~~~~~~~~~~~~~~~~~ 5394 | ab->user_buf = buf; | ~~~~~~~~~~~~~~~~~~~ 5395 | ab->user_buf_size = buf_size; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5396 | ab->len = 0; | ~~~~~~~~~~~~ 5397 | } | ~ 5398 | | 5399 | /* | ~~ 5400 | * Appends a single char to the altbuf. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5401 | */ | ~~ 5402 | MG_INTERNAL void altbuf_append(struct altbuf *ab, char c) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5403 | if (ab->len < ab->user_buf_size) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5404 | /* The data fits into the original buffer */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5405 | ab->user_buf[ab->len++] = c; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5406 | } else { | ~~~~~~~~ 5407 | /* The data can't fit into the original buffer, so write it to mbuf. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5408 | | 5409 | /* | ~~ 5410 | * First of all, see if that's the first byte which overflows the original | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5411 | * buffer: if so, copy the existing data from there to a newly allocated | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5412 | * mbuf. | ~~~~~~~ 5413 | */ | ~~ 5414 | if (ab->len > 0 && ab->m.len == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5415 | mbuf_append(&ab->m, ab->user_buf, ab->len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5416 | } | ~ 5417 | | 5418 | mbuf_append(&ab->m, &c, 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5419 | ab->len = ab->m.len; | ~~~~~~~~~~~~~~~~~~~~ 5420 | } | ~ 5421 | } | ~ 5422 | | 5423 | /* | ~~ 5424 | * Resets any data previously appended to altbuf. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5425 | */ | ~~ 5426 | MG_INTERNAL void altbuf_reset(struct altbuf *ab) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5427 | mbuf_free(&ab->m); | ~~~~~~~~~~~~~~~~~~ 5428 | ab->len = 0; | ~~~~~~~~~~~~ 5429 | } | ~ 5430 | | 5431 | /* | ~~ 5432 | * Returns whether the additional buffer was allocated (and thus the data | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5433 | * is in the mbuf, not the client-provided buffer) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5434 | */ | ~~ 5435 | MG_INTERNAL int altbuf_reallocated(struct altbuf *ab) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5436 | return ab->len > ab->user_buf_size; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5437 | } | ~ 5438 | | 5439 | /* | ~~ 5440 | * Returns the actual buffer with data, either the client-provided or a newly | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5441 | * allocated one. If `trim` is non-zero, mbuf-backed buffer is trimmed first. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5442 | */ | ~~ 5443 | MG_INTERNAL char *altbuf_get_buf(struct altbuf *ab, int trim) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5444 | if (altbuf_reallocated(ab)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5445 | if (trim) { | ~~~~~~~~~~~ 5446 | mbuf_trim(&ab->m); | ~~~~~~~~~~~~~~~~~~ 5447 | } | ~ 5448 | return ab->m.buf; | ~~~~~~~~~~~~~~~~~ 5449 | } else { | ~~~~~~~~ 5450 | return ab->user_buf; | ~~~~~~~~~~~~~~~~~~~~ 5451 | } | ~ 5452 | } | ~ 5453 | | 5454 | /* }}} */ | ~~~~~~~~~ 5455 | | 5456 | static const char *mg_version_header = "Mongoose/" MG_VERSION; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5457 | | 5458 | enum mg_http_proto_data_type { DATA_NONE, DATA_FILE, DATA_PUT }; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5459 | | 5460 | struct mg_http_proto_data_file { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5461 | FILE *fp; /* Opened file. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5462 | int64_t cl; /* Content-Length. How many bytes to send. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5463 | int64_t sent; /* How many bytes have been already sent. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5464 | int keepalive; /* Keep connection open after sending. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5465 | enum mg_http_proto_data_type type; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5466 | }; | ~~ 5467 | | 5468 | #if MG_ENABLE_HTTP_CGI | ~~~~~~~~~~~~~~~~~~~~~~ 5469 | struct mg_http_proto_data_cgi { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5470 | struct mg_connection *cgi_nc; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5471 | }; | ~~ 5472 | #endif | ~~~~~~ 5473 | | 5474 | struct mg_http_proto_data_chuncked { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5475 | int64_t body_len; /* How many bytes of chunked body was reassembled. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5476 | }; | ~~ 5477 | | 5478 | struct mg_http_endpoint { | ~~~~~~~~~~~~~~~~~~~~~~~~~ 5479 | struct mg_http_endpoint *next; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5480 | struct mg_str uri_pattern; /* owned */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5481 | char *auth_domain; /* owned */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5482 | char *auth_file; /* owned */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5483 | | 5484 | mg_event_handler_t handler; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5485 | #if MG_ENABLE_CALLBACK_USERDATA | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5486 | void *user_data; | ~~~~~~~~~~~~~~~~ 5487 | #endif | ~~~~~~ 5488 | }; | ~~ 5489 | | 5490 | enum mg_http_multipart_stream_state { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5491 | MPS_BEGIN, | ~~~~~~~~~~ 5492 | MPS_WAITING_FOR_BOUNDARY, | ~~~~~~~~~~~~~~~~~~~~~~~~~ 5493 | MPS_WAITING_FOR_CHUNK, | ~~~~~~~~~~~~~~~~~~~~~~ 5494 | MPS_GOT_CHUNK, | ~~~~~~~~~~~~~~ 5495 | MPS_GOT_BOUNDARY, | ~~~~~~~~~~~~~~~~~ 5496 | MPS_FINALIZE, | ~~~~~~~~~~~~~ 5497 | MPS_FINISHED | ~~~~~~~~~~~~ 5498 | }; | ~~ 5499 | | 5500 | struct mg_http_multipart_stream { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5501 | const char *boundary; | ~~~~~~~~~~~~~~~~~~~~~ 5502 | int boundary_len; | ~~~~~~~~~~~~~~~~~ 5503 | const char *var_name; | ~~~~~~~~~~~~~~~~~~~~~ 5504 | const char *file_name; | ~~~~~~~~~~~~~~~~~~~~~~ 5505 | void *user_data; | ~~~~~~~~~~~~~~~~ 5506 | int prev_io_len; | ~~~~~~~~~~~~~~~~ 5507 | enum mg_http_multipart_stream_state state; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5508 | int processing_part; | ~~~~~~~~~~~~~~~~~~~~ 5509 | }; | ~~ 5510 | | 5511 | struct mg_reverse_proxy_data { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5512 | struct mg_connection *linked_conn; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5513 | }; | ~~ 5514 | | 5515 | struct mg_ws_proto_data { | ~~~~~~~~~~~~~~~~~~~~~~~~~ 5516 | /* | ~~ 5517 | * Defragmented size of the frame so far. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5518 | * | ~ 5519 | * First byte of nc->recv_mbuf.buf is an op, the rest of the data is | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5520 | * defragmented data. | ~~~~~~~~~~~~~~~~~~~~ 5521 | */ | ~~ 5522 | size_t reass_len; | ~~~~~~~~~~~~~~~~~ 5523 | }; | ~~ 5524 | | 5525 | struct mg_http_proto_data { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5526 | #if MG_ENABLE_FILESYSTEM | ~~~~~~~~~~~~~~~~~~~~~~~~ 5527 | struct mg_http_proto_data_file file; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5528 | #endif | ~~~~~~ 5529 | #if MG_ENABLE_HTTP_CGI | ~~~~~~~~~~~~~~~~~~~~~~ 5530 | struct mg_http_proto_data_cgi cgi; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5531 | #endif | ~~~~~~ 5532 | #if MG_ENABLE_HTTP_STREAMING_MULTIPART | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5533 | struct mg_http_multipart_stream mp_stream; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5534 | #endif | ~~~~~~ 5535 | #if MG_ENABLE_HTTP_WEBSOCKET | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5536 | struct mg_ws_proto_data ws_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5537 | #endif | ~~~~~~ 5538 | struct mg_http_proto_data_chuncked chunk; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5539 | struct mg_http_endpoint *endpoints; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5540 | mg_event_handler_t endpoint_handler; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5541 | struct mg_reverse_proxy_data reverse_proxy_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5542 | size_t rcvd; /* How many bytes we have received. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5543 | }; | ~~ 5544 | | 5545 | static void mg_http_conn_destructor(void *proto_data); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5546 | struct mg_connection *mg_connect_http_base( | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5547 | struct mg_mgr *mgr, MG_CB(mg_event_handler_t ev_handler, void *user_data), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5548 | struct mg_connect_opts opts, const char *scheme1, const char *scheme2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5549 | const char *scheme_ssl1, const char *scheme_ssl2, const char *url, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5550 | struct mg_str *path, struct mg_str *user_info, struct mg_str *host); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5551 | | 5552 | static struct mg_http_proto_data *mg_http_get_proto_data( | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5553 | struct mg_connection *c) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 5554 | if (c->proto_data == NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5555 | c->proto_data = MG_CALLOC(1, sizeof(struct mg_http_proto_data)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5556 | c->proto_data_destructor = mg_http_conn_destructor; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5557 | } | ~ 5558 | | 5559 | return (struct mg_http_proto_data *) c->proto_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5560 | } | ~ 5561 | | 5562 | #if MG_ENABLE_HTTP_STREAMING_MULTIPART | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5563 | static void mg_http_free_proto_data_mp_stream( | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5564 | struct mg_http_multipart_stream *mp) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5565 | MG_FREE((void *) mp->boundary); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5566 | MG_FREE((void *) mp->var_name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5567 | MG_FREE((void *) mp->file_name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5568 | memset(mp, 0, sizeof(*mp)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5569 | } | ~ 5570 | #endif | ~~~~~~ 5571 | | 5572 | #if MG_ENABLE_FILESYSTEM | ~~~~~~~~~~~~~~~~~~~~~~~~ 5573 | static void mg_http_free_proto_data_file(struct mg_http_proto_data_file *d) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5574 | if (d != NULL) { | ~~~~~~~~~~~~~~~~ 5575 | if (d->fp != NULL) { | ~~~~~~~~~~~~~~~~~~~~ 5576 | fclose(d->fp); | ~~~~~~~~~~~~~~ 5577 | } | ~ 5578 | memset(d, 0, sizeof(struct mg_http_proto_data_file)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5579 | } | ~ 5580 | } | ~ 5581 | #endif | ~~~~~~ 5582 | | 5583 | static void mg_http_free_proto_data_endpoints(struct mg_http_endpoint **ep) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5584 | struct mg_http_endpoint *current = *ep; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5585 | | 5586 | while (current != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~ 5587 | struct mg_http_endpoint *tmp = current->next; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5588 | MG_FREE((void *) current->uri_pattern.p); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5589 | MG_FREE((void *) current->auth_domain); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5590 | MG_FREE((void *) current->auth_file); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5591 | MG_FREE(current); | ~~~~~~~~~~~~~~~~~ 5592 | current = tmp; | ~~~~~~~~~~~~~~ 5593 | } | ~ 5594 | | 5595 | ep = NULL; | ~~~~~~~~~~ 5596 | } | ~ 5597 | | 5598 | static void mg_http_free_reverse_proxy_data(struct mg_reverse_proxy_data *rpd) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5599 | if (rpd->linked_conn != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5600 | /* | ~~ 5601 | * Connection has linked one, we have to unlink & close it | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5602 | * since _this_ connection is going to die and | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5603 | * it doesn't make sense to keep another one | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5604 | */ | ~~ 5605 | struct mg_http_proto_data *pd = mg_http_get_proto_data(rpd->linked_conn); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5606 | if (pd->reverse_proxy_data.linked_conn != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5607 | pd->reverse_proxy_data.linked_conn->flags |= MG_F_SEND_AND_CLOSE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5608 | pd->reverse_proxy_data.linked_conn = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5609 | } | ~ 5610 | rpd->linked_conn = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~ 5611 | } | ~ 5612 | } | ~ 5613 | | 5614 | static void mg_http_conn_destructor(void *proto_data) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5615 | struct mg_http_proto_data *pd = (struct mg_http_proto_data *) proto_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5616 | #if MG_ENABLE_FILESYSTEM | ~~~~~~~~~~~~~~~~~~~~~~~~ 5617 | mg_http_free_proto_data_file(&pd->file); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5618 | #endif | ~~~~~~ 5619 | #if MG_ENABLE_HTTP_CGI | ~~~~~~~~~~~~~~~~~~~~~~ 5620 | mg_http_free_proto_data_cgi(&pd->cgi); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5621 | #endif | ~~~~~~ 5622 | #if MG_ENABLE_HTTP_STREAMING_MULTIPART | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5623 | mg_http_free_proto_data_mp_stream(&pd->mp_stream); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5624 | #endif | ~~~~~~ 5625 | mg_http_free_proto_data_endpoints(&pd->endpoints); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5626 | mg_http_free_reverse_proxy_data(&pd->reverse_proxy_data); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5627 | MG_FREE(proto_data); | ~~~~~~~~~~~~~~~~~~~~ 5628 | } | ~ 5629 | | 5630 | #if MG_ENABLE_FILESYSTEM | ~~~~~~~~~~~~~~~~~~~~~~~~ 5631 | | 5632 | #define MIME_ENTRY(_ext, _type) \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5633 | { _ext, sizeof(_ext) - 1, _type } | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5634 | static const struct { | ~~~~~~~~~~~~~~~~~~~~~ 5635 | const char *extension; | ~~~~~~~~~~~~~~~~~~~~~~ 5636 | size_t ext_len; | ~~~~~~~~~~~~~~~ 5637 | const char *mime_type; | ~~~~~~~~~~~~~~~~~~~~~~ 5638 | } mg_static_builtin_mime_types[] = { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5639 | MIME_ENTRY("html", "text/html"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5640 | MIME_ENTRY("html", "text/html"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5641 | MIME_ENTRY("htm", "text/html"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5642 | MIME_ENTRY("shtm", "text/html"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5643 | MIME_ENTRY("shtml", "text/html"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5644 | MIME_ENTRY("css", "text/css"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5645 | MIME_ENTRY("js", "application/x-javascript"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5646 | MIME_ENTRY("ico", "image/x-icon"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5647 | MIME_ENTRY("gif", "image/gif"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5648 | MIME_ENTRY("jpg", "image/jpeg"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5649 | MIME_ENTRY("jpeg", "image/jpeg"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5650 | MIME_ENTRY("png", "image/png"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5651 | MIME_ENTRY("svg", "image/svg+xml"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5652 | MIME_ENTRY("txt", "text/plain"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5653 | MIME_ENTRY("torrent", "application/x-bittorrent"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5654 | MIME_ENTRY("wav", "audio/x-wav"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5655 | MIME_ENTRY("mp3", "audio/x-mp3"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5656 | MIME_ENTRY("mid", "audio/mid"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5657 | MIME_ENTRY("m3u", "audio/x-mpegurl"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5658 | MIME_ENTRY("ogg", "application/ogg"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5659 | MIME_ENTRY("ram", "audio/x-pn-realaudio"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5660 | MIME_ENTRY("xml", "text/xml"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5661 | MIME_ENTRY("ttf", "application/x-font-ttf"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5662 | MIME_ENTRY("json", "application/json"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5663 | MIME_ENTRY("xslt", "application/xml"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5664 | MIME_ENTRY("xsl", "application/xml"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5665 | MIME_ENTRY("ra", "audio/x-pn-realaudio"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5666 | MIME_ENTRY("doc", "application/msword"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5667 | MIME_ENTRY("exe", "application/octet-stream"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5668 | MIME_ENTRY("zip", "application/x-zip-compressed"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5669 | MIME_ENTRY("xls", "application/excel"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5670 | MIME_ENTRY("tgz", "application/x-tar-gz"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5671 | MIME_ENTRY("tar", "application/x-tar"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5672 | MIME_ENTRY("gz", "application/x-gunzip"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5673 | MIME_ENTRY("arj", "application/x-arj-compressed"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5674 | MIME_ENTRY("rar", "application/x-rar-compressed"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5675 | MIME_ENTRY("rtf", "application/rtf"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5676 | MIME_ENTRY("pdf", "application/pdf"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5677 | MIME_ENTRY("swf", "application/x-shockwave-flash"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5678 | MIME_ENTRY("mpg", "video/mpeg"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5679 | MIME_ENTRY("webm", "video/webm"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5680 | MIME_ENTRY("mpeg", "video/mpeg"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5681 | MIME_ENTRY("mov", "video/quicktime"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5682 | MIME_ENTRY("mp4", "video/mp4"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5683 | MIME_ENTRY("m4v", "video/x-m4v"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5684 | MIME_ENTRY("asf", "video/x-ms-asf"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5685 | MIME_ENTRY("avi", "video/x-msvideo"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5686 | MIME_ENTRY("bmp", "image/bmp"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5687 | {NULL, 0, NULL}}; | ~~~~~~~~~~~~~~~~~ 5688 | | 5689 | static struct mg_str mg_get_mime_type(const char *path, const char *dflt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5690 | const struct mg_serve_http_opts *opts) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5691 | const char *ext, *overrides; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5692 | size_t i, path_len; | ~~~~~~~~~~~~~~~~~~~ 5693 | struct mg_str r, k, v; | ~~~~~~~~~~~~~~~~~~~~~~ 5694 | | 5695 | path_len = strlen(path); | ~~~~~~~~~~~~~~~~~~~~~~~~ 5696 | | 5697 | overrides = opts->custom_mime_types; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5698 | while ((overrides = mg_next_comma_list_entry(overrides, &k, &v)) != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5699 | ext = path + (path_len - k.len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5700 | if (path_len > k.len && mg_vcasecmp(&k, ext) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5701 | return v; | ~~~~~~~~~ 5702 | } | ~ 5703 | } | ~ 5704 | | 5705 | for (i = 0; mg_static_builtin_mime_types[i].extension != NULL; i++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5706 | ext = path + (path_len - mg_static_builtin_mime_types[i].ext_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5707 | if (path_len > mg_static_builtin_mime_types[i].ext_len && ext[-1] == '.' && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5708 | mg_casecmp(ext, mg_static_builtin_mime_types[i].extension) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5709 | r.p = mg_static_builtin_mime_types[i].mime_type; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5710 | r.len = strlen(r.p); | ~~~~~~~~~~~~~~~~~~~~ 5711 | return r; | ~~~~~~~~~ 5712 | } | ~ 5713 | } | ~ 5714 | | 5715 | r.p = dflt; | ~~~~~~~~~~~ 5716 | r.len = strlen(r.p); | ~~~~~~~~~~~~~~~~~~~~ 5717 | return r; | ~~~~~~~~~ 5718 | } | ~ 5719 | #endif | ~~~~~~ 5720 | | 5721 | /* | ~~ 5722 | * Check whether full request is buffered. Return: | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5723 | * -1 if request is malformed | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5724 | * 0 if request is not yet fully buffered | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5725 | * >0 actual request length, including last \r\n\r\n | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5726 | */ | ~~ 5727 | static int mg_http_get_request_len(const char *s, int buf_len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5728 | const unsigned char *buf = (unsigned char *) s; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5729 | int i; | ~~~~~~ 5730 | | 5731 | for (i = 0; i < buf_len; i++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5732 | if (!isprint(buf[i]) && buf[i] != '\r' && buf[i] != '\n' && buf[i] < 128) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5733 | return -1; | ~~~~~~~~~~ 5734 | } else if (buf[i] == '\n' && i + 1 < buf_len && buf[i + 1] == '\n') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5735 | return i + 2; | ~~~~~~~~~~~~~ 5736 | } else if (buf[i] == '\n' && i + 2 < buf_len && buf[i + 1] == '\r' && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5737 | buf[i + 2] == '\n') { | ~~~~~~~~~~~~~~~~~~~~~ 5738 | return i + 3; | ~~~~~~~~~~~~~ 5739 | } | ~ 5740 | } | ~ 5741 | | 5742 | return 0; | ~~~~~~~~~ 5743 | } | ~ 5744 | | 5745 | static const char *mg_http_parse_headers(const char *s, const char *end, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5746 | int len, struct http_message *req) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5747 | int i = 0; | ~~~~~~~~~~ 5748 | while (i < (int) ARRAY_SIZE(req->header_names) - 1) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5749 | struct mg_str *k = &req->header_names[i], *v = &req->header_values[i]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5750 | | 5751 | s = mg_skip(s, end, ": ", k); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5752 | s = mg_skip(s, end, "\r\n", v); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5753 | | 5754 | while (v->len > 0 && v->p[v->len - 1] == ' ') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5755 | v->len--; /* Trim trailing spaces in header value */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5756 | } | ~ 5757 | | 5758 | /* | ~~ 5759 | * If header value is empty - skip it and go to next (if any). | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5760 | * NOTE: Do not add it to headers_values because such addition changes API | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5761 | * behaviour | ~~~~~~~~~~~ 5762 | */ | ~~ 5763 | if (k->len != 0 && v->len == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5764 | continue; | ~~~~~~~~~ 5765 | } | ~ 5766 | | 5767 | if (k->len == 0 || v->len == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5768 | k->p = v->p = NULL; | ~~~~~~~~~~~~~~~~~~~ 5769 | k->len = v->len = 0; | ~~~~~~~~~~~~~~~~~~~~ 5770 | break; | ~~~~~~ 5771 | } | ~ 5772 | | 5773 | if (!mg_ncasecmp(k->p, "Content-Length", 14)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5774 | req->body.len = (size_t) to64(v->p); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5775 | req->message.len = len + req->body.len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5776 | } | ~ 5777 | | 5778 | i++; | ~~~~ 5779 | } | ~ 5780 | | 5781 | return s; | ~~~~~~~~~ 5782 | } | ~ 5783 | | 5784 | int mg_parse_http(const char *s, int n, struct http_message *hm, int is_req) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5785 | const char *end, *qs; | ~~~~~~~~~~~~~~~~~~~~~ 5786 | int len = mg_http_get_request_len(s, n); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5787 | | 5788 | if (len <= 0) return len; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 5789 | | 5790 | memset(hm, 0, sizeof(*hm)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5791 | hm->message.p = s; | ~~~~~~~~~~~~~~~~~~ 5792 | hm->body.p = s + len; | ~~~~~~~~~~~~~~~~~~~~~ 5793 | hm->message.len = hm->body.len = (size_t) ~0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5794 | end = s + len; | ~~~~~~~~~~~~~~ 5795 | | 5796 | /* Request is fully buffered. Skip leading whitespaces. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5797 | while (s < end && isspace(*(unsigned char *) s)) s++; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5798 | | 5799 | if (is_req) { | ~~~~~~~~~~~~~ 5800 | /* Parse request line: method, URI, proto */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5801 | s = mg_skip(s, end, " ", &hm->method); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5802 | s = mg_skip(s, end, " ", &hm->uri); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5803 | s = mg_skip(s, end, "\r\n", &hm->proto); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5804 | if (hm->uri.p <= hm->method.p || hm->proto.p <= hm->uri.p) return -1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5805 | | 5806 | /* If URI contains '?' character, initialize query_string */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5807 | if ((qs = (char *) memchr(hm->uri.p, '?', hm->uri.len)) != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5808 | hm->query_string.p = qs + 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5809 | hm->query_string.len = &hm->uri.p[hm->uri.len] - (qs + 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5810 | hm->uri.len = qs - hm->uri.p; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5811 | } | ~ 5812 | } else { | ~~~~~~~~ 5813 | s = mg_skip(s, end, " ", &hm->proto); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5814 | if (end - s < 4 || s[3] != ' ') return -1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5815 | hm->resp_code = atoi(s); | ~~~~~~~~~~~~~~~~~~~~~~~~ 5816 | if (hm->resp_code < 100 || hm->resp_code >= 600) return -1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5817 | s += 4; | ~~~~~~~ 5818 | s = mg_skip(s, end, "\r\n", &hm->resp_status_msg); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5819 | } | ~ 5820 | | 5821 | s = mg_http_parse_headers(s, end, len, hm); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5822 | | 5823 | /* | ~~ 5824 | * mg_parse_http() is used to parse both HTTP requests and HTTP | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5825 | * responses. If HTTP response does not have Content-Length set, then | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5826 | * body is read until socket is closed, i.e. body.len is infinite (~0). | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5827 | * | ~ 5828 | * For HTTP requests though, according to | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5829 | * http://tools.ietf.org/html/rfc7231#section-8.1.3, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5830 | * only POST and PUT methods have defined body semantics. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5831 | * Therefore, if Content-Length is not specified and methods are | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5832 | * not one of PUT or POST, set body length to 0. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5833 | * | ~ 5834 | * So, | ~~~~~ 5835 | * if it is HTTP request, and Content-Length is not set, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5836 | * and method is not (PUT or POST) then reset body length to zero. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5837 | */ | ~~ 5838 | if (hm->body.len == (size_t) ~0 && is_req && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5839 | mg_vcasecmp(&hm->method, "PUT") != 0 && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5840 | mg_vcasecmp(&hm->method, "POST") != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5841 | hm->body.len = 0; | ~~~~~~~~~~~~~~~~~ 5842 | hm->message.len = len; | ~~~~~~~~~~~~~~~~~~~~~~ 5843 | } | ~ 5844 | | 5845 | return len; | ~~~~~~~~~~~ 5846 | } | ~ 5847 | | 5848 | struct mg_str *mg_get_http_header(struct http_message *hm, const char *name) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5849 | size_t i, len = strlen(name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5850 | | 5851 | for (i = 0; hm->header_names[i].len > 0; i++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5852 | struct mg_str *h = &hm->header_names[i], *v = &hm->header_values[i]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5853 | if (h->p != NULL && h->len == len && !mg_ncasecmp(h->p, name, len)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5854 | return v; | ~~~~~~~~~ 5855 | } | ~ 5856 | | 5857 | return NULL; | ~~~~~~~~~~~~ 5858 | } | ~ 5859 | | 5860 | #if MG_ENABLE_FILESYSTEM | ~~~~~~~~~~~~~~~~~~~~~~~~ 5861 | static void mg_http_transfer_file_data(struct mg_connection *nc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5862 | struct mg_http_proto_data *pd = mg_http_get_proto_data(nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5863 | char buf[MG_MAX_HTTP_SEND_MBUF]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5864 | size_t n = 0, to_read = 0, left = (size_t)(pd->file.cl - pd->file.sent); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5865 | | 5866 | if (pd->file.type == DATA_FILE) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5867 | struct mbuf *io = &nc->send_mbuf; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5868 | if (io->len >= MG_MAX_HTTP_SEND_MBUF) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5869 | to_read = 0; | ~~~~~~~~~~~~ 5870 | } else { | ~~~~~~~~ 5871 | to_read = MG_MAX_HTTP_SEND_MBUF - io->len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5872 | } | ~ 5873 | if (to_read > left) { | ~~~~~~~~~~~~~~~~~~~~~ 5874 | to_read = left; | ~~~~~~~~~~~~~~~ 5875 | } | ~ 5876 | if (to_read > 0) { | ~~~~~~~~~~~~~~~~~~ 5877 | n = mg_fread(buf, 1, to_read, pd->file.fp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5878 | if (n > 0) { | ~~~~~~~~~~~~ 5879 | mg_send(nc, buf, n); | ~~~~~~~~~~~~~~~~~~~~ 5880 | pd->file.sent += n; | ~~~~~~~~~~~~~~~~~~~ 5881 | DBG(("%p sent %d (total %d)", nc, (int) n, (int) pd->file.sent)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5882 | } | ~ 5883 | } else { | ~~~~~~~~ 5884 | /* Rate-limited */ | ~~~~~~~~~~~~~~~~~~ 5885 | } | ~ 5886 | if (pd->file.sent >= pd->file.cl) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5887 | LOG(LL_DEBUG, ("%p done, %d bytes", nc, (int) pd->file.sent)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5888 | if (!pd->file.keepalive) nc->flags |= MG_F_SEND_AND_CLOSE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5889 | mg_http_free_proto_data_file(&pd->file); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5890 | } | ~ 5891 | } else if (pd->file.type == DATA_PUT) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5892 | struct mbuf *io = &nc->recv_mbuf; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5893 | size_t to_write = left <= 0 ? 0 : left < io->len ? (size_t) left : io->len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5894 | size_t n = mg_fwrite(io->buf, 1, to_write, pd->file.fp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5895 | if (n > 0) { | ~~~~~~~~~~~~ 5896 | mbuf_remove(io, n); | ~~~~~~~~~~~~~~~~~~~ 5897 | pd->file.sent += n; | ~~~~~~~~~~~~~~~~~~~ 5898 | } | ~ 5899 | if (n == 0 || pd->file.sent >= pd->file.cl) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5900 | if (!pd->file.keepalive) nc->flags |= MG_F_SEND_AND_CLOSE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5901 | mg_http_free_proto_data_file(&pd->file); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5902 | } | ~ 5903 | } | ~ 5904 | #if MG_ENABLE_HTTP_CGI | ~~~~~~~~~~~~~~~~~~~~~~ 5905 | else if (pd->cgi.cgi_nc != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5906 | /* This is POST data that needs to be forwarded to the CGI process */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5907 | if (pd->cgi.cgi_nc != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5908 | mg_forward(nc, pd->cgi.cgi_nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5909 | } else { | ~~~~~~~~ 5910 | nc->flags |= MG_F_SEND_AND_CLOSE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5911 | } | ~ 5912 | } | ~ 5913 | #endif | ~~~~~~ 5914 | } | ~ 5915 | #endif /* MG_ENABLE_FILESYSTEM */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5916 | | 5917 | /* | ~~ 5918 | * Parse chunked-encoded buffer. Return 0 if the buffer is not encoded, or | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5919 | * if it's incomplete. If the chunk is fully buffered, return total number of | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5920 | * bytes in a chunk, and store data in `data`, `data_len`. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5921 | */ | ~~ 5922 | static size_t mg_http_parse_chunk(char *buf, size_t len, char **chunk_data, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5923 | size_t *chunk_len) { | ~~~~~~~~~~~~~~~~~~~~ 5924 | unsigned char *s = (unsigned char *) buf; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5925 | size_t n = 0; /* scanned chunk length */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5926 | size_t i = 0; /* index in s */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5927 | | 5928 | /* Scan chunk length. That should be a hexadecimal number. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5929 | while (i < len && isxdigit(s[i])) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5930 | n *= 16; | ~~~~~~~~ 5931 | n += (s[i] >= '0' && s[i] <= '9') ? s[i] - '0' : tolower(s[i]) - 'a' + 10; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5932 | i++; | ~~~~ 5933 | } | ~ 5934 | | 5935 | /* Skip new line */ | ~~~~~~~~~~~~~~~~~~~ 5936 | if (i == 0 || i + 2 > len || s[i] != '\r' || s[i + 1] != '\n') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5937 | return 0; | ~~~~~~~~~ 5938 | } | ~ 5939 | i += 2; | ~~~~~~~ 5940 | | 5941 | /* Record where the data is */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5942 | *chunk_data = (char *) s + i; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5943 | *chunk_len = n; | ~~~~~~~~~~~~~~~ 5944 | | 5945 | /* Skip data */ | ~~~~~~~~~~~~~~~ 5946 | i += n; | ~~~~~~~ 5947 | | 5948 | /* Skip new line */ | ~~~~~~~~~~~~~~~~~~~ 5949 | if (i == 0 || i + 2 > len || s[i] != '\r' || s[i + 1] != '\n') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5950 | return 0; | ~~~~~~~~~ 5951 | } | ~ 5952 | return i + 2; | ~~~~~~~~~~~~~ 5953 | } | ~ 5954 | | 5955 | MG_INTERNAL size_t mg_handle_chunked(struct mg_connection *nc, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5956 | struct http_message *hm, char *buf, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5957 | size_t blen) { | ~~~~~~~~~~~~~~ 5958 | struct mg_http_proto_data *pd = mg_http_get_proto_data(nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5959 | char *data; | ~~~~~~~~~~~ 5960 | size_t i, n, data_len, body_len, zero_chunk_received = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5961 | /* Find out piece of received data that is not yet reassembled */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5962 | body_len = (size_t) pd->chunk.body_len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5963 | assert(blen >= body_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 5964 | | 5965 | /* Traverse all fully buffered chunks */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5966 | for (i = body_len; | ~~~~~~~~~~~~~~~~~~ 5967 | (n = mg_http_parse_chunk(buf + i, blen - i, &data, &data_len)) > 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5968 | i += n) { | ~~~~~~~~~ 5969 | /* Collapse chunk data to the rest of HTTP body */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5970 | memmove(buf + body_len, data, data_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5971 | body_len += data_len; | ~~~~~~~~~~~~~~~~~~~~~ 5972 | hm->body.len = body_len; | ~~~~~~~~~~~~~~~~~~~~~~~~ 5973 | | 5974 | if (data_len == 0) { | ~~~~~~~~~~~~~~~~~~~~ 5975 | zero_chunk_received = 1; | ~~~~~~~~~~~~~~~~~~~~~~~~ 5976 | i += n; | ~~~~~~~ 5977 | break; | ~~~~~~ 5978 | } | ~ 5979 | } | ~ 5980 | | 5981 | if (i > body_len) { | ~~~~~~~~~~~~~~~~~~~ 5982 | /* Shift unparsed content to the parsed body */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5983 | assert(i <= blen); | ~~~~~~~~~~~~~~~~~~ 5984 | memmove(buf + body_len, buf + i, blen - i); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5985 | memset(buf + body_len + blen - i, 0, i - body_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5986 | nc->recv_mbuf.len -= i - body_len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5987 | pd->chunk.body_len = body_len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5988 | | 5989 | /* Send MG_EV_HTTP_CHUNK event */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5990 | nc->flags &= ~MG_F_DELETE_CHUNK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5991 | mg_call(nc, nc->handler, nc->user_data, MG_EV_HTTP_CHUNK, hm); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5992 | | 5993 | /* Delete processed data if user set MG_F_DELETE_CHUNK flag */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5994 | if (nc->flags & MG_F_DELETE_CHUNK) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5995 | memset(buf, 0, body_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 5996 | memmove(buf, buf + body_len, blen - i); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5997 | nc->recv_mbuf.len -= body_len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5998 | hm->body.len = 0; | ~~~~~~~~~~~~~~~~~ 5999 | pd->chunk.body_len = 0; | ~~~~~~~~~~~~~~~~~~~~~~~ 6000 | } | ~ 6001 | | 6002 | if (zero_chunk_received) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 6003 | /* Total message size is len(body) + len(headers) */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6004 | hm->message.len = | ~~~~~~~~~~~~~~~~~ 6005 | (size_t) pd->chunk.body_len + blen - i + (hm->body.p - hm->message.p); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6006 | } | ~ 6007 | } | ~ 6008 | | 6009 | return body_len; | ~~~~~~~~~~~~~~~~ 6010 | } | ~ 6011 | | 6012 | struct mg_http_endpoint *mg_http_get_endpoint_handler(struct mg_connection *nc, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6013 | struct mg_str *uri_path) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 6014 | struct mg_http_proto_data *pd; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6015 | struct mg_http_endpoint *ret = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6016 | int matched, matched_max = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6017 | struct mg_http_endpoint *ep; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6018 | | 6019 | if (nc == NULL) { | ~~~~~~~~~~~~~~~~~ 6020 | return NULL; | ~~~~~~~~~~~~ 6021 | } | ~ 6022 | | 6023 | pd = mg_http_get_proto_data(nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6024 | | 6025 | ep = pd->endpoints; | ~~~~~~~~~~~~~~~~~~~ 6026 | while (ep != NULL) { | ~~~~~~~~~~~~~~~~~~~~ 6027 | if ((matched = mg_match_prefix_n(ep->uri_pattern, *uri_path)) > 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6028 | if (matched > matched_max) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6029 | /* Looking for the longest suitable handler */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6030 | ret = ep; | ~~~~~~~~~ 6031 | matched_max = matched; | ~~~~~~~~~~~~~~~~~~~~~~ 6032 | } | ~ 6033 | } | ~ 6034 | | 6035 | ep = ep->next; | ~~~~~~~~~~~~~~ 6036 | } | ~ 6037 | | 6038 | return ret; | ~~~~~~~~~~~ 6039 | } | ~ 6040 | | 6041 | #if MG_ENABLE_HTTP_STREAMING_MULTIPART | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6042 | static void mg_http_multipart_continue(struct mg_connection *nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6043 | | 6044 | static void mg_http_multipart_begin(struct mg_connection *nc, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6045 | struct http_message *hm, int req_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6046 | | 6047 | #endif | ~~~~~~ 6048 | | 6049 | static void mg_http_call_endpoint_handler(struct mg_connection *nc, int ev, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6050 | struct http_message *hm); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 6051 | | 6052 | static void deliver_chunk(struct mg_connection *c, struct http_message *hm, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6053 | int req_len) { | ~~~~~~~~~~~~~~ 6054 | /* Incomplete message received. Send MG_EV_HTTP_CHUNK event */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6055 | hm->body.len = c->recv_mbuf.len - req_len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6056 | c->flags &= ~MG_F_DELETE_CHUNK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6057 | mg_call(c, c->handler, c->user_data, MG_EV_HTTP_CHUNK, hm); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6058 | /* Delete processed data if user set MG_F_DELETE_CHUNK flag */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6059 | if (c->flags & MG_F_DELETE_CHUNK) c->recv_mbuf.len = req_len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6060 | } | ~ 6061 | | 6062 | /* | ~~ 6063 | * lx106 compiler has a bug (TODO(mkm) report and insert tracking bug here) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6064 | * If a big structure is declared in a big function, lx106 gcc will make it | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6065 | * even bigger (round up to 4k, from 700 bytes of actual size). | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6066 | */ | ~~ 6067 | #ifdef __xtensa__ | ~~~~~~~~~~~~~~~~~ 6068 | static void mg_http_handler2(struct mg_connection *nc, int ev, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6069 | void *ev_data MG_UD_ARG(void *user_data), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6070 | struct http_message *hm) __attribute__((noinline)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6071 | | 6072 | void mg_http_handler(struct mg_connection *nc, int ev, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6073 | void *ev_data MG_UD_ARG(void *user_data)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6074 | struct http_message hm; | ~~~~~~~~~~~~~~~~~~~~~~~ 6075 | mg_http_handler2(nc, ev, ev_data MG_UD_ARG(user_data), &hm); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6076 | } | ~ 6077 | | 6078 | static void mg_http_handler2(struct mg_connection *nc, int ev, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6079 | void *ev_data MG_UD_ARG(void *user_data), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6080 | struct http_message *hm) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 6081 | #else /* !__XTENSA__ */ | ~~~~~~~~~~~~~~~~~~~~~~~~ 6082 | void mg_http_handler(struct mg_connection *nc, int ev, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6083 | void *ev_data MG_UD_ARG(void *user_data)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6084 | struct http_message shm, *hm = &shm; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6085 | #endif /* __XTENSA__ */ | ~~~~~~~~~~~~~~~~~~~~~~~ 6086 | struct mg_http_proto_data *pd = mg_http_get_proto_data(nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6087 | struct mbuf *io = &nc->recv_mbuf; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6088 | int req_len; | ~~~~~~~~~~~~ 6089 | const int is_req = (nc->listener != NULL); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6090 | #if MG_ENABLE_HTTP_WEBSOCKET | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6091 | struct mg_str *vec; | ~~~~~~~~~~~~~~~~~~~ 6092 | #endif | ~~~~~~ 6093 | if (ev == MG_EV_CLOSE) { | ~~~~~~~~~~~~~~~~~~~~~~~~ 6094 | #if MG_ENABLE_HTTP_CGI | ~~~~~~~~~~~~~~~~~~~~~~ 6095 | /* Close associated CGI forwarder connection */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6096 | if (pd->cgi.cgi_nc != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6097 | pd->cgi.cgi_nc->user_data = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6098 | pd->cgi.cgi_nc->flags |= MG_F_CLOSE_IMMEDIATELY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6099 | } | ~ 6100 | #endif | ~~~~~~ 6101 | #if MG_ENABLE_HTTP_STREAMING_MULTIPART | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6102 | if (pd->mp_stream.boundary != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6103 | /* | ~~ 6104 | * Multipart message is in progress, but connection is closed. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6105 | * Finish part and request with an error flag. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6106 | */ | ~~ 6107 | struct mg_http_multipart_part mp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6108 | memset(&mp, 0, sizeof(mp)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6109 | mp.status = -1; | ~~~~~~~~~~~~~~~ 6110 | mp.var_name = pd->mp_stream.var_name; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6111 | mp.file_name = pd->mp_stream.file_name; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6112 | mg_call(nc, (pd->endpoint_handler ? pd->endpoint_handler : nc->handler), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6113 | nc->user_data, MG_EV_HTTP_PART_END, &mp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6114 | mp.var_name = NULL; | ~~~~~~~~~~~~~~~~~~~ 6115 | mp.file_name = NULL; | ~~~~~~~~~~~~~~~~~~~~ 6116 | mg_call(nc, (pd->endpoint_handler ? pd->endpoint_handler : nc->handler), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6117 | nc->user_data, MG_EV_HTTP_MULTIPART_REQUEST_END, &mp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6118 | } else | ~~~~~~ 6119 | #endif | ~~~~~~ 6120 | if (io->len > 0 && | ~~~~~~~~~~~~~~~~~~ 6121 | (req_len = mg_parse_http(io->buf, io->len, hm, is_req)) > 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6122 | /* | ~~ 6123 | * For HTTP messages without Content-Length, always send HTTP message | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6124 | * before MG_EV_CLOSE message. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6125 | */ | ~~ 6126 | int ev2 = is_req ? MG_EV_HTTP_REQUEST : MG_EV_HTTP_REPLY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6127 | hm->message.len = io->len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 6128 | hm->body.len = io->buf + io->len - hm->body.p; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6129 | deliver_chunk(nc, hm, req_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6130 | mg_http_call_endpoint_handler(nc, ev2, hm); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6131 | } | ~ 6132 | pd->rcvd = 0; | ~~~~~~~~~~~~~ 6133 | } | ~ 6134 | | 6135 | #if MG_ENABLE_FILESYSTEM | ~~~~~~~~~~~~~~~~~~~~~~~~ 6136 | if (pd->file.fp != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 6137 | mg_http_transfer_file_data(nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6138 | } | ~ 6139 | #endif | ~~~~~~ 6140 | | 6141 | mg_call(nc, nc->handler, nc->user_data, ev, ev_data); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6142 | | 6143 | if (ev == MG_EV_RECV) { | ~~~~~~~~~~~~~~~~~~~~~~~ 6144 | struct mg_str *s; | ~~~~~~~~~~~~~~~~~ 6145 | pd->rcvd += *(int *) ev_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6146 | | 6147 | #if MG_ENABLE_HTTP_STREAMING_MULTIPART | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6148 | if (pd->mp_stream.boundary != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6149 | mg_http_multipart_continue(nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6150 | return; | ~~~~~~~ 6151 | } | ~ 6152 | #endif /* MG_ENABLE_HTTP_STREAMING_MULTIPART */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6153 | | 6154 | req_len = mg_parse_http(io->buf, io->len, hm, is_req); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6155 | | 6156 | if (req_len > 0 && | ~~~~~~~~~~~~~~~~~~ 6157 | (s = mg_get_http_header(hm, "Transfer-Encoding")) != NULL && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6158 | mg_vcasecmp(s, "chunked") == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6159 | mg_handle_chunked(nc, hm, io->buf + req_len, io->len - req_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6160 | } | ~ 6161 | | 6162 | #if MG_ENABLE_HTTP_STREAMING_MULTIPART | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6163 | if (req_len > 0 && (s = mg_get_http_header(hm, "Content-Type")) != NULL && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6164 | s->len >= 9 && strncmp(s->p, "multipart", 9) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6165 | mg_http_multipart_begin(nc, hm, req_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6166 | mg_http_multipart_continue(nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6167 | return; | ~~~~~~~ 6168 | } | ~ 6169 | #endif /* MG_ENABLE_HTTP_STREAMING_MULTIPART */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6170 | | 6171 | /* TODO(alashkin): refactor this ifelseifelseifelseifelse */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6172 | if ((req_len < 0 || | ~~~~~~~~~~~~~~~~~~~ 6173 | (req_len == 0 && io->len >= MG_MAX_HTTP_REQUEST_SIZE))) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6174 | DBG(("invalid request")); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 6175 | nc->flags |= MG_F_CLOSE_IMMEDIATELY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6176 | } else if (req_len == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 6177 | /* Do nothing, request is not yet fully buffered */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6178 | } | ~ 6179 | #if MG_ENABLE_HTTP_WEBSOCKET | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6180 | else if (nc->listener == NULL && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6181 | mg_get_http_header(hm, "Sec-WebSocket-Accept")) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6182 | /* We're websocket client, got handshake response from server. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6183 | /* TODO(lsm): check the validity of accept Sec-WebSocket-Accept */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6184 | mbuf_remove(io, req_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 6185 | nc->proto_handler = mg_ws_handler; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6186 | nc->flags |= MG_F_IS_WEBSOCKET; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6187 | mg_call(nc, nc->handler, nc->user_data, MG_EV_WEBSOCKET_HANDSHAKE_DONE, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6188 | NULL); | ~~~~~~ 6189 | mg_ws_handler(nc, MG_EV_RECV, ev_data MG_UD_ARG(user_data)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6190 | } else if (nc->listener != NULL && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6191 | (vec = mg_get_http_header(hm, "Sec-WebSocket-Key")) != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6192 | struct mg_http_endpoint *ep; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6193 | | 6194 | /* This is a websocket request. Switch protocol handlers. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6195 | mbuf_remove(io, req_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 6196 | nc->proto_handler = mg_ws_handler; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6197 | nc->flags |= MG_F_IS_WEBSOCKET; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6198 | | 6199 | /* | ~~ 6200 | * If we have a handler set up with mg_register_http_endpoint(), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6201 | * deliver subsequent websocket events to this handler after the | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6202 | * protocol switch. | ~~~~~~~~~~~~~~~~~~ 6203 | */ | ~~ 6204 | ep = mg_http_get_endpoint_handler(nc->listener, &hm->uri); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6205 | if (ep != NULL) { | ~~~~~~~~~~~~~~~~~ 6206 | nc->handler = ep->handler; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 6207 | #if MG_ENABLE_CALLBACK_USERDATA | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6208 | nc->user_data = ep->user_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6209 | #endif | ~~~~~~ 6210 | } | ~ 6211 | | 6212 | /* Send handshake */ | ~~~~~~~~~~~~~~~~~~~~ 6213 | mg_call(nc, nc->handler, nc->user_data, MG_EV_WEBSOCKET_HANDSHAKE_REQUEST, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6214 | hm); | ~~~~ 6215 | if (!(nc->flags & (MG_F_CLOSE_IMMEDIATELY | MG_F_SEND_AND_CLOSE))) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6216 | if (nc->send_mbuf.len == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6217 | mg_ws_handshake(nc, vec, hm); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6218 | } | ~ 6219 | mg_call(nc, nc->handler, nc->user_data, MG_EV_WEBSOCKET_HANDSHAKE_DONE, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6220 | NULL); | ~~~~~~ 6221 | mg_ws_handler(nc, MG_EV_RECV, ev_data MG_UD_ARG(user_data)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6222 | } | ~ 6223 | } | ~ 6224 | #endif /* MG_ENABLE_HTTP_WEBSOCKET */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6225 | else if (hm->message.len > pd->rcvd) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6226 | /* Not yet received all HTTP body, deliver MG_EV_HTTP_CHUNK */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6227 | deliver_chunk(nc, hm, req_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6228 | if (nc->recv_mbuf_limit > 0 && nc->recv_mbuf.len >= nc->recv_mbuf_limit) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6229 | LOG(LL_ERROR, ("%p recv buffer (%lu bytes) exceeds the limit " | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6230 | "%lu bytes, and not drained, closing", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6231 | nc, (unsigned long) nc->recv_mbuf.len, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6232 | (unsigned long) nc->recv_mbuf_limit)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6233 | nc->flags |= MG_F_CLOSE_IMMEDIATELY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6234 | } | ~ 6235 | } else { | ~~~~~~~~ 6236 | /* We did receive all HTTP body. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6237 | int trigger_ev = nc->listener ? MG_EV_HTTP_REQUEST : MG_EV_HTTP_REPLY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6238 | char addr[32]; | ~~~~~~~~~~~~~~ 6239 | mg_sock_addr_to_str(&nc->sa, addr, sizeof(addr), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6240 | MG_SOCK_STRINGIFY_IP | MG_SOCK_STRINGIFY_PORT); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6241 | DBG(("%p %s %.*s %.*s", nc, addr, (int) hm->method.len, hm->method.p, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6242 | (int) hm->uri.len, hm->uri.p)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6243 | deliver_chunk(nc, hm, req_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6244 | /* Whole HTTP message is fully buffered, call event handler */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6245 | mg_http_call_endpoint_handler(nc, trigger_ev, hm); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6246 | mbuf_remove(io, hm->message.len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6247 | pd->rcvd = 0; | ~~~~~~~~~~~~~ 6248 | } | ~ 6249 | } | ~ 6250 | } | ~ 6251 | | 6252 | static size_t mg_get_line_len(const char *buf, size_t buf_len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6253 | size_t len = 0; | ~~~~~~~~~~~~~~~ 6254 | while (len < buf_len && buf[len] != '\n') len++; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6255 | return len == buf_len ? 0 : len + 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6256 | } | ~ 6257 | | 6258 | #if MG_ENABLE_HTTP_STREAMING_MULTIPART | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6259 | static void mg_http_multipart_begin(struct mg_connection *nc, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6260 | struct http_message *hm, int req_len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6261 | struct mg_http_proto_data *pd = mg_http_get_proto_data(nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6262 | struct mg_str *ct; | ~~~~~~~~~~~~~~~~~~ 6263 | struct mbuf *io = &nc->recv_mbuf; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6264 | | 6265 | char boundary_buf[100]; | ~~~~~~~~~~~~~~~~~~~~~~~ 6266 | char *boundary = boundary_buf; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6267 | int boundary_len; | ~~~~~~~~~~~~~~~~~ 6268 | | 6269 | ct = mg_get_http_header(hm, "Content-Type"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6270 | if (ct == NULL) { | ~~~~~~~~~~~~~~~~~ 6271 | /* We need more data - or it isn't multipart mesage */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6272 | goto exit_mp; | ~~~~~~~~~~~~~ 6273 | } | ~ 6274 | | 6275 | /* Content-type should start with "multipart" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6276 | if (ct->len < 9 || strncmp(ct->p, "multipart", 9) != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6277 | goto exit_mp; | ~~~~~~~~~~~~~ 6278 | } | ~ 6279 | | 6280 | boundary_len = | ~~~~~~~~~~~~~~ 6281 | mg_http_parse_header2(ct, "boundary", &boundary, sizeof(boundary_buf)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6282 | if (boundary_len == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~ 6283 | /* | ~~ 6284 | * Content type is multipart, but there is no boundary, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6285 | * probably malformed request | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6286 | */ | ~~ 6287 | nc->flags = MG_F_CLOSE_IMMEDIATELY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6288 | DBG(("invalid request")); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 6289 | goto exit_mp; | ~~~~~~~~~~~~~ 6290 | } | ~ 6291 | | 6292 | /* If we reach this place - that is multipart request */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6293 | | 6294 | if (pd->mp_stream.boundary != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6295 | /* | ~~ 6296 | * Another streaming request was in progress, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6297 | * looks like protocol error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6298 | */ | ~~ 6299 | nc->flags |= MG_F_CLOSE_IMMEDIATELY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6300 | } else { | ~~~~~~~~ 6301 | struct mg_http_endpoint *ep = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6302 | pd->mp_stream.state = MPS_BEGIN; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6303 | pd->mp_stream.boundary = strdup(boundary); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6304 | pd->mp_stream.boundary_len = strlen(boundary); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6305 | pd->mp_stream.var_name = pd->mp_stream.file_name = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6306 | pd->endpoint_handler = nc->handler; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6307 | | 6308 | ep = mg_http_get_endpoint_handler(nc->listener, &hm->uri); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6309 | if (ep != NULL) { | ~~~~~~~~~~~~~~~~~ 6310 | pd->endpoint_handler = ep->handler; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6311 | } | ~ 6312 | | 6313 | mg_http_call_endpoint_handler(nc, MG_EV_HTTP_MULTIPART_REQUEST, hm); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6314 | | 6315 | mbuf_remove(io, req_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~ 6316 | } | ~ 6317 | exit_mp: | ~~~~~~~~ 6318 | if (boundary != boundary_buf) MG_FREE(boundary); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6319 | } | ~ 6320 | | 6321 | #define CONTENT_DISPOSITION "Content-Disposition: " | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6322 | | 6323 | static void mg_http_multipart_call_handler(struct mg_connection *c, int ev, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6324 | const char *data, size_t data_len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6325 | struct mg_http_multipart_part mp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6326 | struct mg_http_proto_data *pd = mg_http_get_proto_data(c); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6327 | memset(&mp, 0, sizeof(mp)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6328 | | 6329 | mp.var_name = pd->mp_stream.var_name; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6330 | mp.file_name = pd->mp_stream.file_name; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6331 | mp.user_data = pd->mp_stream.user_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6332 | mp.data.p = data; | ~~~~~~~~~~~~~~~~~ 6333 | mp.data.len = data_len; | ~~~~~~~~~~~~~~~~~~~~~~~ 6334 | mg_call(c, pd->endpoint_handler, c->user_data, ev, &mp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6335 | pd->mp_stream.user_data = mp.user_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6336 | } | ~ 6337 | | 6338 | static int mg_http_multipart_got_chunk(struct mg_connection *c) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6339 | struct mg_http_proto_data *pd = mg_http_get_proto_data(c); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6340 | struct mbuf *io = &c->recv_mbuf; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6341 | | 6342 | mg_http_multipart_call_handler(c, MG_EV_HTTP_PART_DATA, io->buf, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6343 | pd->mp_stream.prev_io_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6344 | mbuf_remove(io, pd->mp_stream.prev_io_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6345 | pd->mp_stream.prev_io_len = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6346 | pd->mp_stream.state = MPS_WAITING_FOR_CHUNK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6347 | | 6348 | return 0; | ~~~~~~~~~ 6349 | } | ~ 6350 | | 6351 | static int mg_http_multipart_finalize(struct mg_connection *c) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6352 | struct mg_http_proto_data *pd = mg_http_get_proto_data(c); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6353 | | 6354 | mg_http_multipart_call_handler(c, MG_EV_HTTP_PART_END, NULL, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6355 | MG_FREE((void *) pd->mp_stream.file_name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6356 | pd->mp_stream.file_name = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6357 | MG_FREE((void *) pd->mp_stream.var_name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6358 | pd->mp_stream.var_name = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6359 | mg_http_multipart_call_handler(c, MG_EV_HTTP_MULTIPART_REQUEST_END, NULL, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6360 | mg_http_free_proto_data_mp_stream(&pd->mp_stream); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6361 | pd->mp_stream.state = MPS_FINISHED; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6362 | | 6363 | return 1; | ~~~~~~~~~ 6364 | } | ~ 6365 | | 6366 | static int mg_http_multipart_wait_for_boundary(struct mg_connection *c) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6367 | const char *boundary; | ~~~~~~~~~~~~~~~~~~~~~ 6368 | struct mbuf *io = &c->recv_mbuf; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6369 | struct mg_http_proto_data *pd = mg_http_get_proto_data(c); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6370 | | 6371 | if (pd->mp_stream.boundary == NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6372 | pd->mp_stream.state = MPS_FINALIZE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6373 | DBG(("Invalid request: boundary not initialized")); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6374 | return 0; | ~~~~~~~~~ 6375 | } | ~ 6376 | | 6377 | if ((int) io->len < pd->mp_stream.boundary_len + 2) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6378 | return 0; | ~~~~~~~~~ 6379 | } | ~ 6380 | | 6381 | boundary = c_strnstr(io->buf, pd->mp_stream.boundary, io->len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6382 | if (boundary != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~ 6383 | const char *boundary_end = (boundary + pd->mp_stream.boundary_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6384 | if (io->len - (boundary_end - io->buf) < 4) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6385 | return 0; | ~~~~~~~~~ 6386 | } | ~ 6387 | if (strncmp(boundary_end, "--\r\n", 4) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6388 | pd->mp_stream.state = MPS_FINALIZE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6389 | mbuf_remove(io, (boundary_end - io->buf) + 4); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6390 | } else { | ~~~~~~~~ 6391 | pd->mp_stream.state = MPS_GOT_BOUNDARY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6392 | } | ~ 6393 | } else { | ~~~~~~~~ 6394 | return 0; | ~~~~~~~~~ 6395 | } | ~ 6396 | | 6397 | return 1; | ~~~~~~~~~ 6398 | } | ~ 6399 | | 6400 | static void mg_http_parse_header_internal(struct mg_str *hdr, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6401 | const char *var_name, | ~~~~~~~~~~~~~~~~~~~~~ 6402 | struct altbuf *ab); | ~~~~~~~~~~~~~~~~~~~ 6403 | | 6404 | static int mg_http_multipart_process_boundary(struct mg_connection *c) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6405 | int data_size; | ~~~~~~~~~~~~~~ 6406 | const char *boundary, *block_begin; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6407 | struct mbuf *io = &c->recv_mbuf; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6408 | struct mg_http_proto_data *pd = mg_http_get_proto_data(c); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6409 | struct altbuf ab_file_name, ab_var_name; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6410 | int line_len; | ~~~~~~~~~~~~~ 6411 | boundary = c_strnstr(io->buf, pd->mp_stream.boundary, io->len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6412 | block_begin = boundary + pd->mp_stream.boundary_len + 2; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6413 | data_size = io->len - (block_begin - io->buf); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6414 | | 6415 | altbuf_init(&ab_file_name, NULL, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6416 | altbuf_init(&ab_var_name, NULL, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6417 | | 6418 | while (data_size > 0 && | ~~~~~~~~~~~~~~~~~~~~~~~ 6419 | (line_len = mg_get_line_len(block_begin, data_size)) != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6420 | if (line_len > (int) sizeof(CONTENT_DISPOSITION) && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6421 | mg_ncasecmp(block_begin, CONTENT_DISPOSITION, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6422 | sizeof(CONTENT_DISPOSITION) - 1) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6423 | struct mg_str header; | ~~~~~~~~~~~~~~~~~~~~~ 6424 | | 6425 | header.p = block_begin + sizeof(CONTENT_DISPOSITION) - 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6426 | header.len = line_len - sizeof(CONTENT_DISPOSITION) - 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6427 | | 6428 | altbuf_reset(&ab_var_name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6429 | mg_http_parse_header_internal(&header, "name", &ab_var_name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6430 | | 6431 | altbuf_reset(&ab_file_name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6432 | mg_http_parse_header_internal(&header, "filename", &ab_file_name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6433 | | 6434 | block_begin += line_len; | ~~~~~~~~~~~~~~~~~~~~~~~~ 6435 | data_size -= line_len; | ~~~~~~~~~~~~~~~~~~~~~~ 6436 | | 6437 | continue; | ~~~~~~~~~ 6438 | } | ~ 6439 | | 6440 | if (line_len == 2 && mg_ncasecmp(block_begin, "\r\n", 2) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6441 | mbuf_remove(io, block_begin - io->buf + 2); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6442 | | 6443 | if (pd->mp_stream.processing_part != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6444 | mg_http_multipart_call_handler(c, MG_EV_HTTP_PART_END, NULL, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6445 | } | ~ 6446 | | 6447 | /* Reserve 2 bytes for "\r\n" in file_name and var_name */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6448 | altbuf_append(&ab_file_name, '\0'); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6449 | altbuf_append(&ab_file_name, '\0'); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6450 | altbuf_append(&ab_var_name, '\0'); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6451 | altbuf_append(&ab_var_name, '\0'); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6452 | | 6453 | MG_FREE((void *) pd->mp_stream.file_name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6454 | pd->mp_stream.file_name = altbuf_get_buf(&ab_file_name, 1 /* trim */); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6455 | MG_FREE((void *) pd->mp_stream.var_name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6456 | pd->mp_stream.var_name = altbuf_get_buf(&ab_var_name, 1 /* trim */); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6457 | | 6458 | mg_http_multipart_call_handler(c, MG_EV_HTTP_PART_BEGIN, NULL, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6459 | pd->mp_stream.state = MPS_WAITING_FOR_CHUNK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6460 | pd->mp_stream.processing_part++; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6461 | return 1; | ~~~~~~~~~ 6462 | } | ~ 6463 | | 6464 | block_begin += line_len; | ~~~~~~~~~~~~~~~~~~~~~~~~ 6465 | } | ~ 6466 | | 6467 | pd->mp_stream.state = MPS_WAITING_FOR_BOUNDARY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6468 | | 6469 | altbuf_reset(&ab_var_name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6470 | altbuf_reset(&ab_file_name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6471 | | 6472 | return 0; | ~~~~~~~~~ 6473 | } | ~ 6474 | | 6475 | static int mg_http_multipart_continue_wait_for_chunk(struct mg_connection *c) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6476 | struct mg_http_proto_data *pd = mg_http_get_proto_data(c); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6477 | struct mbuf *io = &c->recv_mbuf; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6478 | | 6479 | const char *boundary; | ~~~~~~~~~~~~~~~~~~~~~ 6480 | if ((int) io->len < pd->mp_stream.boundary_len + 6 /* \r\n, --, -- */) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6481 | return 0; | ~~~~~~~~~ 6482 | } | ~ 6483 | | 6484 | boundary = c_strnstr(io->buf, pd->mp_stream.boundary, io->len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6485 | if (boundary == NULL && pd->mp_stream.prev_io_len == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6486 | pd->mp_stream.prev_io_len = io->len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6487 | return 0; | ~~~~~~~~~ 6488 | } else if (boundary == NULL && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6489 | (int) io->len > | ~~~~~~~~~~~~~~~ 6490 | pd->mp_stream.prev_io_len + pd->mp_stream.boundary_len + 4) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6491 | pd->mp_stream.state = MPS_GOT_CHUNK; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6492 | return 1; | ~~~~~~~~~ 6493 | } else if (boundary != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6494 | int data_size = (boundary - io->buf - 4); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6495 | mg_http_multipart_call_handler(c, MG_EV_HTTP_PART_DATA, io->buf, data_size); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6496 | mbuf_remove(io, (boundary - io->buf)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6497 | pd->mp_stream.prev_io_len = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6498 | pd->mp_stream.state = MPS_WAITING_FOR_BOUNDARY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6499 | return 1; | ~~~~~~~~~ 6500 | } else { | ~~~~~~~~ 6501 | return 0; | ~~~~~~~~~ 6502 | } | ~ 6503 | } | ~ 6504 | | 6505 | static void mg_http_multipart_continue(struct mg_connection *c) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6506 | struct mg_http_proto_data *pd = mg_http_get_proto_data(c); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6507 | while (1) { | ~~~~~~~~~~~ 6508 | switch (pd->mp_stream.state) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6509 | case MPS_BEGIN: { | ~~~~~~~~~~~~~~~~~ 6510 | pd->mp_stream.state = MPS_WAITING_FOR_BOUNDARY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6511 | break; | ~~~~~~ 6512 | } | ~ 6513 | case MPS_WAITING_FOR_BOUNDARY: { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6514 | if (mg_http_multipart_wait_for_boundary(c) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6515 | return; | ~~~~~~~ 6516 | } | ~ 6517 | break; | ~~~~~~ 6518 | } | ~ 6519 | case MPS_GOT_BOUNDARY: { | ~~~~~~~~~~~~~~~~~~~~~~~~ 6520 | if (mg_http_multipart_process_boundary(c) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6521 | return; | ~~~~~~~ 6522 | } | ~ 6523 | break; | ~~~~~~ 6524 | } | ~ 6525 | case MPS_WAITING_FOR_CHUNK: { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6526 | if (mg_http_multipart_continue_wait_for_chunk(c) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6527 | return; | ~~~~~~~ 6528 | } | ~ 6529 | break; | ~~~~~~ 6530 | } | ~ 6531 | case MPS_GOT_CHUNK: { | ~~~~~~~~~~~~~~~~~~~~~ 6532 | if (mg_http_multipart_got_chunk(c) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6533 | return; | ~~~~~~~ 6534 | } | ~ 6535 | break; | ~~~~~~ 6536 | } | ~ 6537 | case MPS_FINALIZE: { | ~~~~~~~~~~~~~~~~~~~~ 6538 | if (mg_http_multipart_finalize(c) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6539 | return; | ~~~~~~~ 6540 | } | ~ 6541 | break; | ~~~~~~ 6542 | } | ~ 6543 | case MPS_FINISHED: { | ~~~~~~~~~~~~~~~~~~~~ 6544 | mbuf_remove(&c->recv_mbuf, c->recv_mbuf.len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6545 | return; | ~~~~~~~ 6546 | } | ~ 6547 | } | ~ 6548 | } | ~ 6549 | } | ~ 6550 | | 6551 | struct file_upload_state { | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 6552 | char *lfn; | ~~~~~~~~~~ 6553 | size_t num_recd; | ~~~~~~~~~~~~~~~~ 6554 | FILE *fp; | ~~~~~~~~~ 6555 | }; | ~~ 6556 | | 6557 | #endif /* MG_ENABLE_HTTP_STREAMING_MULTIPART */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6558 | | 6559 | void mg_set_protocol_http_websocket(struct mg_connection *nc) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6560 | nc->proto_handler = mg_http_handler; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6561 | } | ~ 6562 | | 6563 | const char *mg_status_message(int status_code) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6564 | switch (status_code) { | ~~~~~~~~~~~~~~~~~~~~~~ 6565 | case 206: | ~~~~~~~~~ 6566 | return "Partial Content"; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 6567 | case 301: | ~~~~~~~~~ 6568 | return "Moved"; | ~~~~~~~~~~~~~~~ 6569 | case 302: | ~~~~~~~~~ 6570 | return "Found"; | ~~~~~~~~~~~~~~~ 6571 | case 400: | ~~~~~~~~~ 6572 | return "Bad Request"; | ~~~~~~~~~~~~~~~~~~~~~ 6573 | case 401: | ~~~~~~~~~ 6574 | return "Unauthorized"; | ~~~~~~~~~~~~~~~~~~~~~~ 6575 | case 403: | ~~~~~~~~~ 6576 | return "Forbidden"; | ~~~~~~~~~~~~~~~~~~~ 6577 | case 404: | ~~~~~~~~~ 6578 | return "Not Found"; | ~~~~~~~~~~~~~~~~~~~ 6579 | case 416: | ~~~~~~~~~ 6580 | return "Requested Range Not Satisfiable"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6581 | case 418: | ~~~~~~~~~ 6582 | return "I'm a teapot"; | ~~~~~~~~~~~~~~~~~~~~~~ 6583 | case 500: | ~~~~~~~~~ 6584 | return "Internal Server Error"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6585 | case 502: | ~~~~~~~~~ 6586 | return "Bad Gateway"; | ~~~~~~~~~~~~~~~~~~~~~ 6587 | case 503: | ~~~~~~~~~ 6588 | return "Service Unavailable"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6589 | | 6590 | #if MG_ENABLE_EXTRA_ERRORS_DESC | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6591 | case 100: | ~~~~~~~~~ 6592 | return "Continue"; | ~~~~~~~~~~~~~~~~~~ 6593 | case 101: | ~~~~~~~~~ 6594 | return "Switching Protocols"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6595 | case 102: | ~~~~~~~~~ 6596 | return "Processing"; | ~~~~~~~~~~~~~~~~~~~~ 6597 | case 200: | ~~~~~~~~~ 6598 | return "OK"; | ~~~~~~~~~~~~ 6599 | case 201: | ~~~~~~~~~ 6600 | return "Created"; | ~~~~~~~~~~~~~~~~~ 6601 | case 202: | ~~~~~~~~~ 6602 | return "Accepted"; | ~~~~~~~~~~~~~~~~~~ 6603 | case 203: | ~~~~~~~~~ 6604 | return "Non-Authoritative Information"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6605 | case 204: | ~~~~~~~~~ 6606 | return "No Content"; | ~~~~~~~~~~~~~~~~~~~~ 6607 | case 205: | ~~~~~~~~~ 6608 | return "Reset Content"; | ~~~~~~~~~~~~~~~~~~~~~~~ 6609 | case 207: | ~~~~~~~~~ 6610 | return "Multi-Status"; | ~~~~~~~~~~~~~~~~~~~~~~ 6611 | case 208: | ~~~~~~~~~ 6612 | return "Already Reported"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 6613 | case 226: | ~~~~~~~~~ 6614 | return "IM Used"; | ~~~~~~~~~~~~~~~~~ 6615 | case 300: | ~~~~~~~~~ 6616 | return "Multiple Choices"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 6617 | case 303: | ~~~~~~~~~ 6618 | return "See Other"; | ~~~~~~~~~~~~~~~~~~~ 6619 | case 304: | ~~~~~~~~~ 6620 | return "Not Modified"; | ~~~~~~~~~~~~~~~~~~~~~~ 6621 | case 305: | ~~~~~~~~~ 6622 | return "Use Proxy"; | ~~~~~~~~~~~~~~~~~~~ 6623 | case 306: | ~~~~~~~~~ 6624 | return "Switch Proxy"; | ~~~~~~~~~~~~~~~~~~~~~~ 6625 | case 307: | ~~~~~~~~~ 6626 | return "Temporary Redirect"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6627 | case 308: | ~~~~~~~~~ 6628 | return "Permanent Redirect"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6629 | case 402: | ~~~~~~~~~ 6630 | return "Payment Required"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 6631 | case 405: | ~~~~~~~~~ 6632 | return "Method Not Allowed"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6633 | case 406: | ~~~~~~~~~ 6634 | return "Not Acceptable"; | ~~~~~~~~~~~~~~~~~~~~~~~~ 6635 | case 407: | ~~~~~~~~~ 6636 | return "Proxy Authentication Required"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6637 | case 408: | ~~~~~~~~~ 6638 | return "Request Timeout"; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 6639 | case 409: | ~~~~~~~~~ 6640 | return "Conflict"; | ~~~~~~~~~~~~~~~~~~ 6641 | case 410: | ~~~~~~~~~ 6642 | return "Gone"; | ~~~~~~~~~~~~~~ 6643 | case 411: | ~~~~~~~~~ 6644 | return "Length Required"; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 6645 | case 412: | ~~~~~~~~~ 6646 | return "Precondition Failed"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6647 | case 413: | ~~~~~~~~~ 6648 | return "Payload Too Large"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6649 | case 414: | ~~~~~~~~~ 6650 | return "URI Too Long"; | ~~~~~~~~~~~~~~~~~~~~~~ 6651 | case 415: | ~~~~~~~~~ 6652 | return "Unsupported Media Type"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6653 | case 417: | ~~~~~~~~~ 6654 | return "Expectation Failed"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6655 | case 422: | ~~~~~~~~~ 6656 | return "Unprocessable Entity"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6657 | case 423: | ~~~~~~~~~ 6658 | return "Locked"; | ~~~~~~~~~~~~~~~~ 6659 | case 424: | ~~~~~~~~~ 6660 | return "Failed Dependency"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6661 | case 426: | ~~~~~~~~~ 6662 | return "Upgrade Required"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 6663 | case 428: | ~~~~~~~~~ 6664 | return "Precondition Required"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6665 | case 429: | ~~~~~~~~~ 6666 | return "Too Many Requests"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6667 | case 431: | ~~~~~~~~~ 6668 | return "Request Header Fields Too Large"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6669 | case 451: | ~~~~~~~~~ 6670 | return "Unavailable For Legal Reasons"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6671 | case 501: | ~~~~~~~~~ 6672 | return "Not Implemented"; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 6673 | case 504: | ~~~~~~~~~ 6674 | return "Gateway Timeout"; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 6675 | case 505: | ~~~~~~~~~ 6676 | return "HTTP Version Not Supported"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6677 | case 506: | ~~~~~~~~~ 6678 | return "Variant Also Negotiates"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6679 | case 507: | ~~~~~~~~~ 6680 | return "Insufficient Storage"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6681 | case 508: | ~~~~~~~~~ 6682 | return "Loop Detected"; | ~~~~~~~~~~~~~~~~~~~~~~~ 6683 | case 510: | ~~~~~~~~~ 6684 | return "Not Extended"; | ~~~~~~~~~~~~~~~~~~~~~~ 6685 | case 511: | ~~~~~~~~~ 6686 | return "Network Authentication Required"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6687 | #endif /* MG_ENABLE_EXTRA_ERRORS_DESC */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6688 | | 6689 | default: | ~~~~~~~~ 6690 | return "OK"; | ~~~~~~~~~~~~ 6691 | } | ~ 6692 | } | ~ 6693 | | 6694 | void mg_send_response_line_s(struct mg_connection *nc, int status_code, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6695 | const struct mg_str extra_headers) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6696 | mg_printf(nc, "HTTP/1.1 %d %s\r\nServer: %s\r\n", status_code, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6697 | mg_status_message(status_code), mg_version_header); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6698 | if (extra_headers.len > 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6699 | mg_printf(nc, "%.*s\r\n", (int) extra_headers.len, extra_headers.p); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6700 | } | ~ 6701 | } | ~ 6702 | | 6703 | void mg_send_response_line(struct mg_connection *nc, int status_code, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6704 | const char *extra_headers) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6705 | mg_send_response_line_s(nc, status_code, mg_mk_str(extra_headers)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6706 | } | ~ 6707 | | 6708 | void mg_http_send_redirect(struct mg_connection *nc, int status_code, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6709 | const struct mg_str location, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6710 | const struct mg_str extra_headers) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6711 | char bbody[100], *pbody = bbody; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6712 | int bl = mg_asprintf(&pbody, sizeof(bbody), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6713 | "

Moved here.\r\n", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6714 | (int) location.len, location.p); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6715 | char bhead[150], *phead = bhead; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6716 | mg_asprintf(&phead, sizeof(bhead), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6717 | "Location: %.*s\r\n" | ~~~~~~~~~~~~~~~~~~~~ 6718 | "Content-Type: text/html\r\n" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6719 | "Content-Length: %d\r\n" | ~~~~~~~~~~~~~~~~~~~~~~~~ 6720 | "Cache-Control: no-cache\r\n" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6721 | "%.*s%s", | ~~~~~~~~~ 6722 | (int) location.len, location.p, bl, (int) extra_headers.len, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6723 | extra_headers.p, (extra_headers.len > 0 ? "\r\n" : "")); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6724 | mg_send_response_line(nc, status_code, phead); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6725 | if (phead != bhead) MG_FREE(phead); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6726 | mg_send(nc, pbody, bl); | ~~~~~~~~~~~~~~~~~~~~~~~ 6727 | if (pbody != bbody) MG_FREE(pbody); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6728 | } | ~ 6729 | | 6730 | void mg_send_head(struct mg_connection *c, int status_code, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6731 | int64_t content_length, const char *extra_headers) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6732 | mg_send_response_line(c, status_code, extra_headers); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6733 | if (content_length < 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~ 6734 | mg_printf(c, "%s", "Transfer-Encoding: chunked\r\n"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6735 | } else { | ~~~~~~~~ 6736 | mg_printf(c, "Content-Length: %" INT64_FMT "\r\n", content_length); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6737 | } | ~ 6738 | mg_send(c, "\r\n", 2); | ~~~~~~~~~~~~~~~~~~~~~~ 6739 | } | ~ 6740 | | 6741 | void mg_http_send_error(struct mg_connection *nc, int code, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6742 | const char *reason) { | ~~~~~~~~~~~~~~~~~~~~~ 6743 | if (!reason) reason = mg_status_message(code); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6744 | LOG(LL_DEBUG, ("%p %d %s", nc, code, reason)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6745 | mg_send_head(nc, code, strlen(reason), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6746 | "Content-Type: text/plain\r\nConnection: close"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6747 | mg_send(nc, reason, strlen(reason)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6748 | nc->flags |= MG_F_SEND_AND_CLOSE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6749 | } | ~ 6750 | | 6751 | #if MG_ENABLE_FILESYSTEM | ~~~~~~~~~~~~~~~~~~~~~~~~ 6752 | static void mg_http_construct_etag(char *buf, size_t buf_len, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6753 | const cs_stat_t *st) { | ~~~~~~~~~~~~~~~~~~~~~~ 6754 | snprintf(buf, buf_len, "\"%lx.%" INT64_FMT "\"", (unsigned long) st->st_mtime, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6755 | (int64_t) st->st_size); | ~~~~~~~~~~~~~~~~~~~~~~~ 6756 | } | ~ 6757 | | 6758 | #ifndef WINCE | ~~~~~~~~~~~~~ 6759 | static void mg_gmt_time_string(char *buf, size_t buf_len, time_t *t) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6760 | strftime(buf, buf_len, "%a, %d %b %Y %H:%M:%S GMT", gmtime(t)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6761 | } | ~ 6762 | #else | ~~~~~ 6763 | /* Look wince_lib.c for WindowsCE implementation */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6764 | static void mg_gmt_time_string(char *buf, size_t buf_len, time_t *t); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6765 | #endif | ~~~~~~ 6766 | | 6767 | static int mg_http_parse_range_header(const struct mg_str *header, int64_t *a, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6768 | int64_t *b) { | ~~~~~~~~~~~~~ 6769 | /* | ~~ 6770 | * There is no snscanf. Headers are not guaranteed to be NUL-terminated, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6771 | * so we have this. Ugh. | ~~~~~~~~~~~~~~~~~~~~~~~ 6772 | */ | ~~ 6773 | int result; | ~~~~~~~~~~~ 6774 | char *p = (char *) MG_MALLOC(header->len + 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6775 | if (p == NULL) return 0; | ~~~~~~~~~~~~~~~~~~~~~~~~ 6776 | memcpy(p, header->p, header->len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6777 | p[header->len] = '\0'; | ~~~~~~~~~~~~~~~~~~~~~~ 6778 | result = sscanf(p, "bytes=%" INT64_FMT "-%" INT64_FMT, a, b); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6779 | MG_FREE(p); | ~~~~~~~~~~~ 6780 | return result; | ~~~~~~~~~~~~~~ 6781 | } | ~ 6782 | | 6783 | void mg_http_serve_file(struct mg_connection *nc, struct http_message *hm, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6784 | const char *path, const struct mg_str mime_type, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6785 | const struct mg_str extra_headers) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6786 | struct mg_http_proto_data *pd = mg_http_get_proto_data(nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6787 | cs_stat_t st; | ~~~~~~~~~~~~~ 6788 | LOG(LL_DEBUG, ("%p [%s] %.*s", nc, path, (int) mime_type.len, mime_type.p)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6789 | if (mg_stat(path, &st) != 0 || (pd->file.fp = mg_fopen(path, "rb")) == NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6790 | int code, err = mg_get_errno(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6791 | switch (err) { | ~~~~~~~~~~~~~~ 6792 | case EACCES: | ~~~~~~~~~~~~ 6793 | code = 403; | ~~~~~~~~~~~ 6794 | break; | ~~~~~~ 6795 | case ENOENT: | ~~~~~~~~~~~~ 6796 | code = 404; | ~~~~~~~~~~~ 6797 | break; | ~~~~~~ 6798 | default: | ~~~~~~~~ 6799 | code = 500; | ~~~~~~~~~~~ 6800 | }; | ~~ 6801 | mg_http_send_error(nc, code, "Open failed"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6802 | } else { | ~~~~~~~~ 6803 | char etag[50], current_time[50], last_modified[50], range[70]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6804 | time_t t = (time_t) mg_time(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6805 | int64_t r1 = 0, r2 = 0, cl = st.st_size; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6806 | struct mg_str *range_hdr = mg_get_http_header(hm, "Range"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6807 | int n, status_code = 200; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 6808 | | 6809 | /* Handle Range header */ | ~~~~~~~~~~~~~~~~~~~~~~~~~ 6810 | range[0] = '\0'; | ~~~~~~~~~~~~~~~~ 6811 | if (range_hdr != NULL && | ~~~~~~~~~~~~~~~~~~~~~~~~ 6812 | (n = mg_http_parse_range_header(range_hdr, &r1, &r2)) > 0 && r1 >= 0 && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6813 | r2 >= 0) { | ~~~~~~~~~~ 6814 | /* If range is specified like "400-", set second limit to content len */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6815 | if (n == 1) { | ~~~~~~~~~~~~~ 6816 | r2 = cl - 1; | ~~~~~~~~~~~~ 6817 | } | ~ 6818 | if (r1 > r2 || r2 >= cl) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 6819 | status_code = 416; | ~~~~~~~~~~~~~~~~~~ 6820 | cl = 0; | ~~~~~~~ 6821 | snprintf(range, sizeof(range), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6822 | "Content-Range: bytes */%" INT64_FMT "\r\n", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6823 | (int64_t) st.st_size); | ~~~~~~~~~~~~~~~~~~~~~~ 6824 | } else { | ~~~~~~~~ 6825 | status_code = 206; | ~~~~~~~~~~~~~~~~~~ 6826 | cl = r2 - r1 + 1; | ~~~~~~~~~~~~~~~~~ 6827 | snprintf(range, sizeof(range), "Content-Range: bytes %" INT64_FMT | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6828 | "-%" INT64_FMT "/%" INT64_FMT "\r\n", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6829 | r1, r1 + cl - 1, (int64_t) st.st_size); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6830 | #if _FILE_OFFSET_BITS == 64 || _POSIX_C_SOURCE >= 200112L || \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6831 | _XOPEN_SOURCE >= 600 | ~~~~~~~~~~~~~~~~~~~~ 6832 | fseeko(pd->file.fp, r1, SEEK_SET); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6833 | #else | ~~~~~ 6834 | fseek(pd->file.fp, (long) r1, SEEK_SET); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6835 | #endif | ~~~~~~ 6836 | } | ~ 6837 | } | ~ 6838 | | 6839 | #if !MG_DISABLE_HTTP_KEEP_ALIVE | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6840 | { | ~ 6841 | struct mg_str *conn_hdr = mg_get_http_header(hm, "Connection"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6842 | if (conn_hdr != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~ 6843 | pd->file.keepalive = (mg_vcasecmp(conn_hdr, "keep-alive") == 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6844 | } else { | ~~~~~~~~ 6845 | pd->file.keepalive = (mg_vcmp(&hm->proto, "HTTP/1.1") == 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6846 | } | ~ 6847 | } | ~ 6848 | #endif | ~~~~~~ 6849 | | 6850 | mg_http_construct_etag(etag, sizeof(etag), &st); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6851 | mg_gmt_time_string(current_time, sizeof(current_time), &t); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6852 | mg_gmt_time_string(last_modified, sizeof(last_modified), &st.st_mtime); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6853 | /* | ~~ 6854 | * Content length casted to size_t because: | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6855 | * 1) that's the maximum buffer size anyway | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6856 | * 2) ESP8266 RTOS SDK newlib vprintf cannot contain a 64bit arg at non-last | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6857 | * position | ~~~~~~~~~~~~~ 6858 | * TODO(mkm): fix ESP8266 RTOS SDK | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6859 | */ | ~~ 6860 | mg_send_response_line_s(nc, status_code, extra_headers); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6861 | mg_printf(nc, | ~~~~~~~~~~~~~ 6862 | "Date: %s\r\n" | ~~~~~~~~~~~~~~ 6863 | "Last-Modified: %s\r\n" | ~~~~~~~~~~~~~~~~~~~~~~~ 6864 | "Accept-Ranges: bytes\r\n" | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 6865 | "Content-Type: %.*s\r\n" | ~~~~~~~~~~~~~~~~~~~~~~~~ 6866 | "Connection: %s\r\n" | ~~~~~~~~~~~~~~~~~~~~ 6867 | "Content-Length: %" SIZE_T_FMT | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6868 | "\r\n" | ~~~~~~ 6869 | "%sEtag: %s\r\n\r\n", | ~~~~~~~~~~~~~~~~~~~~~ 6870 | current_time, last_modified, (int) mime_type.len, mime_type.p, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6871 | (pd->file.keepalive ? "keep-alive" : "close"), (size_t) cl, range, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6872 | etag); | ~~~~~~ 6873 | | 6874 | pd->file.cl = cl; | ~~~~~~~~~~~~~~~~~ 6875 | pd->file.type = DATA_FILE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 6876 | mg_http_transfer_file_data(nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6877 | } | ~ 6878 | } | ~ 6879 | | 6880 | static void mg_http_serve_file2(struct mg_connection *nc, const char *path, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6881 | struct http_message *hm, | ~~~~~~~~~~~~~~~~~~~~~~~~ 6882 | struct mg_serve_http_opts *opts) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6883 | #if MG_ENABLE_HTTP_SSI | ~~~~~~~~~~~~~~~~~~~~~~ 6884 | if (mg_match_prefix(opts->ssi_pattern, strlen(opts->ssi_pattern), path) > 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6885 | mg_handle_ssi_request(nc, hm, path, opts); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6886 | return; | ~~~~~~~ 6887 | } | ~ 6888 | #endif | ~~~~~~ 6889 | mg_http_serve_file(nc, hm, path, mg_get_mime_type(path, "text/plain", opts), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6890 | mg_mk_str(opts->extra_headers)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6891 | } | ~ 6892 | | 6893 | #endif | ~~~~~~ 6894 | | 6895 | int mg_url_decode(const char *src, int src_len, char *dst, int dst_len, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6896 | int is_form_url_encoded) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 6897 | int i, j, a, b; | ~~~~~~~~~~~~~~~ 6898 | #define HEXTOI(x) (isdigit(x) ? x - '0' : x - 'W') | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6899 | | 6900 | for (i = j = 0; i < src_len && j < dst_len - 1; i++, j++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6901 | if (src[i] == '%') { | ~~~~~~~~~~~~~~~~~~~~ 6902 | if (i < src_len - 2 && isxdigit(*(const unsigned char *) (src + i + 1)) && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6903 | isxdigit(*(const unsigned char *) (src + i + 2))) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6904 | a = tolower(*(const unsigned char *) (src + i + 1)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6905 | b = tolower(*(const unsigned char *) (src + i + 2)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6906 | dst[j] = (char) ((HEXTOI(a) << 4) | HEXTOI(b)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6907 | i += 2; | ~~~~~~~ 6908 | } else { | ~~~~~~~~ 6909 | return -1; | ~~~~~~~~~~ 6910 | } | ~ 6911 | } else if (is_form_url_encoded && src[i] == '+') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6912 | dst[j] = ' '; | ~~~~~~~~~~~~~ 6913 | } else { | ~~~~~~~~ 6914 | dst[j] = src[i]; | ~~~~~~~~~~~~~~~~ 6915 | } | ~ 6916 | } | ~ 6917 | | 6918 | dst[j] = '\0'; /* Null-terminate the destination */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6919 | | 6920 | return i >= src_len ? j : -1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6921 | } | ~ 6922 | | 6923 | int mg_get_http_var(const struct mg_str *buf, const char *name, char *dst, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6924 | size_t dst_len) { | ~~~~~~~~~~~~~~~~~ 6925 | const char *p, *e, *s; | ~~~~~~~~~~~~~~~~~~~~~~ 6926 | size_t name_len; | ~~~~~~~~~~~~~~~~ 6927 | int len; | ~~~~~~~~ 6928 | | 6929 | /* | ~~ 6930 | * According to the documentation function returns negative | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6931 | * value in case of error. For debug purposes it returns: | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6932 | * -1 - src is wrong (NUUL) | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 6933 | * -2 - dst is wrong (NULL) | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 6934 | * -3 - failed to decode url or dst is to small | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6935 | * -4 - name does not exist | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 6936 | */ | ~~ 6937 | if (dst == NULL || dst_len == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6938 | len = -2; | ~~~~~~~~~ 6939 | } else if (buf->p == NULL || name == NULL || buf->len == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6940 | len = -1; | ~~~~~~~~~ 6941 | dst[0] = '\0'; | ~~~~~~~~~~~~~~ 6942 | } else { | ~~~~~~~~ 6943 | name_len = strlen(name); | ~~~~~~~~~~~~~~~~~~~~~~~~ 6944 | e = buf->p + buf->len; | ~~~~~~~~~~~~~~~~~~~~~~ 6945 | len = -4; | ~~~~~~~~~ 6946 | dst[0] = '\0'; | ~~~~~~~~~~~~~~ 6947 | | 6948 | for (p = buf->p; p + name_len < e; p++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6949 | if ((p == buf->p || p[-1] == '&') && p[name_len] == '=' && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6950 | !mg_ncasecmp(name, p, name_len)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6951 | p += name_len + 1; | ~~~~~~~~~~~~~~~~~~ 6952 | s = (const char *) memchr(p, '&', (size_t)(e - p)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6953 | if (s == NULL) { | ~~~~~~~~~~~~~~~~ 6954 | s = e; | ~~~~~~ 6955 | } | ~ 6956 | len = mg_url_decode(p, (size_t)(s - p), dst, dst_len, 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6957 | /* -1 means: failed to decode or dst is too small */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6958 | if (len == -1) { | ~~~~~~~~~~~~~~~~ 6959 | len = -3; | ~~~~~~~~~ 6960 | } | ~ 6961 | break; | ~~~~~~ 6962 | } | ~ 6963 | } | ~ 6964 | } | ~ 6965 | | 6966 | return len; | ~~~~~~~~~~~ 6967 | } | ~ 6968 | | 6969 | void mg_send_http_chunk(struct mg_connection *nc, const char *buf, size_t len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6970 | char chunk_size[50]; | ~~~~~~~~~~~~~~~~~~~~ 6971 | int n; | ~~~~~~ 6972 | | 6973 | n = snprintf(chunk_size, sizeof(chunk_size), "%lX\r\n", (unsigned long) len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6974 | mg_send(nc, chunk_size, n); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6975 | mg_send(nc, buf, len); | ~~~~~~~~~~~~~~~~~~~~~~ 6976 | mg_send(nc, "\r\n", 2); | ~~~~~~~~~~~~~~~~~~~~~~~ 6977 | } | ~ 6978 | | 6979 | void mg_printf_http_chunk(struct mg_connection *nc, const char *fmt, ...) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6980 | char mem[MG_VPRINTF_BUFFER_SIZE], *buf = mem; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6981 | int len; | ~~~~~~~~ 6982 | va_list ap; | ~~~~~~~~~~~ 6983 | | 6984 | va_start(ap, fmt); | ~~~~~~~~~~~~~~~~~~ 6985 | len = mg_avprintf(&buf, sizeof(mem), fmt, ap); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6986 | va_end(ap); | ~~~~~~~~~~~ 6987 | | 6988 | if (len >= 0) { | ~~~~~~~~~~~~~~~ 6989 | mg_send_http_chunk(nc, buf, len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6990 | } | ~ 6991 | | 6992 | /* LCOV_EXCL_START */ | ~~~~~~~~~~~~~~~~~~~~~ 6993 | if (buf != mem && buf != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6994 | MG_FREE(buf); | ~~~~~~~~~~~~~ 6995 | } | ~ 6996 | /* LCOV_EXCL_STOP */ | ~~~~~~~~~~~~~~~~~~~~ 6997 | } | ~ 6998 | | 6999 | void mg_printf_html_escape(struct mg_connection *nc, const char *fmt, ...) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7000 | char mem[MG_VPRINTF_BUFFER_SIZE], *buf = mem; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7001 | int i, j, len; | ~~~~~~~~~~~~~~ 7002 | va_list ap; | ~~~~~~~~~~~ 7003 | | 7004 | va_start(ap, fmt); | ~~~~~~~~~~~~~~~~~~ 7005 | len = mg_avprintf(&buf, sizeof(mem), fmt, ap); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7006 | va_end(ap); | ~~~~~~~~~~~ 7007 | | 7008 | if (len >= 0) { | ~~~~~~~~~~~~~~~ 7009 | for (i = j = 0; i < len; i++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7010 | if (buf[i] == '<' || buf[i] == '>') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7011 | mg_send(nc, buf + j, i - j); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7012 | mg_send(nc, buf[i] == '<' ? "<" : ">", 4); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7013 | j = i + 1; | ~~~~~~~~~~ 7014 | } | ~ 7015 | } | ~ 7016 | mg_send(nc, buf + j, i - j); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7017 | } | ~ 7018 | | 7019 | /* LCOV_EXCL_START */ | ~~~~~~~~~~~~~~~~~~~~~ 7020 | if (buf != mem && buf != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7021 | MG_FREE(buf); | ~~~~~~~~~~~~~ 7022 | } | ~ 7023 | /* LCOV_EXCL_STOP */ | ~~~~~~~~~~~~~~~~~~~~ 7024 | } | ~ 7025 | | 7026 | static void mg_http_parse_header_internal(struct mg_str *hdr, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7027 | const char *var_name, | ~~~~~~~~~~~~~~~~~~~~~ 7028 | struct altbuf *ab) { | ~~~~~~~~~~~~~~~~~~~~ 7029 | int ch = ' ', ch1 = ',', n = strlen(var_name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7030 | const char *p, *end = hdr ? hdr->p + hdr->len : NULL, *s = NULL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7031 | | 7032 | /* Find where variable starts */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7033 | for (s = hdr->p; s != NULL && s + n < end; s++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7034 | if ((s == hdr->p || s[-1] == ch || s[-1] == ch1 || s[-1] == ';') && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7035 | s[n] == '=' && !strncmp(s, var_name, n)) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7036 | break; | ~~~~~~ 7037 | } | ~ 7038 | | 7039 | if (s != NULL && &s[n + 1] < end) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7040 | s += n + 1; | ~~~~~~~~~~~ 7041 | if (*s == '"' || *s == '\'') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7042 | ch = ch1 = *s++; | ~~~~~~~~~~~~~~~~ 7043 | } | ~ 7044 | p = s; | ~~~~~~ 7045 | while (p < end && p[0] != ch && p[0] != ch1) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7046 | if (ch != ' ' && p[0] == '\\' && p[1] == ch) p++; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7047 | altbuf_append(ab, *p++); | ~~~~~~~~~~~~~~~~~~~~~~~~ 7048 | } | ~ 7049 | | 7050 | if (ch != ' ' && *p != ch) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7051 | altbuf_reset(ab); | ~~~~~~~~~~~~~~~~~ 7052 | } | ~ 7053 | } | ~ 7054 | | 7055 | /* If there is some data, append a NUL. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7056 | if (ab->len > 0) { | ~~~~~~~~~~~~~~~~~~ 7057 | altbuf_append(ab, '\0'); | ~~~~~~~~~~~~~~~~~~~~~~~~ 7058 | } | ~ 7059 | } | ~ 7060 | | 7061 | int mg_http_parse_header2(struct mg_str *hdr, const char *var_name, char **buf, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7062 | size_t buf_size) { | ~~~~~~~~~~~~~~~~~~ 7063 | struct altbuf ab; | ~~~~~~~~~~~~~~~~~ 7064 | altbuf_init(&ab, *buf, buf_size); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7065 | if (hdr == NULL) return 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 7066 | if (*buf != NULL && buf_size > 0) *buf[0] = '\0'; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7067 | | 7068 | mg_http_parse_header_internal(hdr, var_name, &ab); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7069 | | 7070 | /* | ~~ 7071 | * Get a (trimmed) buffer, and return a len without a NUL byte which might | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7072 | * have been added. | ~~~~~~~~~~~~~~~~~~ 7073 | */ | ~~ 7074 | *buf = altbuf_get_buf(&ab, 1 /* trim */); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7075 | return ab.len > 0 ? ab.len - 1 : 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7076 | } | ~ 7077 | | 7078 | int mg_http_parse_header(struct mg_str *hdr, const char *var_name, char *buf, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7079 | size_t buf_size) { | ~~~~~~~~~~~~~~~~~~ 7080 | char *buf2 = buf; | ~~~~~~~~~~~~~~~~~ 7081 | | 7082 | int len = mg_http_parse_header2(hdr, var_name, &buf2, buf_size); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7083 | | 7084 | if (buf2 != buf) { | ~~~~~~~~~~~~~~~~~~ 7085 | /* Buffer was not enough and was reallocated: free it and just return 0 */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7086 | MG_FREE(buf2); | ~~~~~~~~~~~~~~ 7087 | return 0; | ~~~~~~~~~ 7088 | } | ~ 7089 | | 7090 | return len; | ~~~~~~~~~~~ 7091 | } | ~ 7092 | | 7093 | int mg_get_http_basic_auth(struct http_message *hm, char *user, size_t user_len, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7094 | char *pass, size_t pass_len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7095 | struct mg_str *hdr = mg_get_http_header(hm, "Authorization"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7096 | if (hdr == NULL) return -1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7097 | return mg_parse_http_basic_auth(hdr, user, user_len, pass, pass_len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7098 | } | ~ 7099 | | 7100 | int mg_parse_http_basic_auth(struct mg_str *hdr, char *user, size_t user_len, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7101 | char *pass, size_t pass_len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7102 | char *buf = NULL; | ~~~~~~~~~~~~~~~~~ 7103 | char fmt[64]; | ~~~~~~~~~~~~~ 7104 | int res = 0; | ~~~~~~~~~~~~ 7105 | | 7106 | if (mg_strncmp(*hdr, mg_mk_str("Basic "), 6) != 0) return -1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7107 | | 7108 | buf = (char *) MG_MALLOC(hdr->len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7109 | cs_base64_decode((unsigned char *) hdr->p + 6, hdr->len, buf, NULL); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7110 | | 7111 | /* e.g. "%123[^:]:%321[^\n]" */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7112 | snprintf(fmt, sizeof(fmt), "%%%" SIZE_T_FMT "[^:]:%%%" SIZE_T_FMT "[^\n]", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7113 | user_len - 1, pass_len - 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7114 | if (sscanf(buf, fmt, user, pass) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7115 | res = -1; | ~~~~~~~~~ 7116 | } | ~ 7117 | | 7118 | MG_FREE(buf); | ~~~~~~~~~~~~~ 7119 | return res; | ~~~~~~~~~~~ 7120 | } | ~ 7121 | | 7122 | #if MG_ENABLE_FILESYSTEM | ~~~~~~~~~~~~~~~~~~~~~~~~ 7123 | static int mg_is_file_hidden(const char *path, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7124 | const struct mg_serve_http_opts *opts, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7125 | int exclude_specials) { | ~~~~~~~~~~~~~~~~~~~~~~~ 7126 | const char *p1 = opts->per_directory_auth_file; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7127 | const char *p2 = opts->hidden_file_pattern; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7128 | | 7129 | /* Strip directory path from the file name */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7130 | const char *pdir = strrchr(path, DIRSEP); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7131 | if (pdir != NULL) { | ~~~~~~~~~~~~~~~~~~~ 7132 | path = pdir + 1; | ~~~~~~~~~~~~~~~~ 7133 | } | ~ 7134 | | 7135 | return (exclude_specials && (!strcmp(path, ".") || !strcmp(path, ".."))) || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7136 | (p1 != NULL && mg_match_prefix(p1, strlen(p1), path) == strlen(p1)) || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7137 | (p2 != NULL && mg_match_prefix(p2, strlen(p2), path) > 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7138 | } | ~ 7139 | | 7140 | #if !MG_DISABLE_HTTP_DIGEST_AUTH | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7141 | | 7142 | #ifndef MG_EXT_MD5 | ~~~~~~~~~~~~~~~~~~ 7143 | void mg_hash_md5_v(size_t num_msgs, const uint8_t *msgs[], | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7144 | const size_t *msg_lens, uint8_t *digest) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7145 | size_t i; | ~~~~~~~~~ 7146 | cs_md5_ctx md5_ctx; | ~~~~~~~~~~~~~~~~~~~ 7147 | cs_md5_init(&md5_ctx); | ~~~~~~~~~~~~~~~~~~~~~~ 7148 | for (i = 0; i < num_msgs; i++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7149 | cs_md5_update(&md5_ctx, msgs[i], msg_lens[i]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7150 | } | ~ 7151 | cs_md5_final(digest, &md5_ctx); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7152 | } | ~ 7153 | #else | ~~~~~ 7154 | extern void mg_hash_md5_v(size_t num_msgs, const uint8_t *msgs[], | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7155 | const size_t *msg_lens, uint8_t *digest); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7156 | #endif | ~~~~~~ 7157 | | 7158 | void cs_md5(char buf[33], ...) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7159 | unsigned char hash[16]; | ~~~~~~~~~~~~~~~~~~~~~~~ 7160 | const uint8_t *msgs[20], *p; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7161 | size_t msg_lens[20]; | ~~~~~~~~~~~~~~~~~~~~ 7162 | size_t num_msgs = 0; | ~~~~~~~~~~~~~~~~~~~~ 7163 | va_list ap; | ~~~~~~~~~~~ 7164 | | 7165 | va_start(ap, buf); | ~~~~~~~~~~~~~~~~~~ 7166 | while ((p = va_arg(ap, const unsigned char *) ) != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7167 | msgs[num_msgs] = p; | ~~~~~~~~~~~~~~~~~~~ 7168 | msg_lens[num_msgs] = va_arg(ap, size_t); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7169 | num_msgs++; | ~~~~~~~~~~~ 7170 | } | ~ 7171 | va_end(ap); | ~~~~~~~~~~~ 7172 | | 7173 | mg_hash_md5_v(num_msgs, msgs, msg_lens, hash); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7174 | cs_to_hex(buf, hash, sizeof(hash)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7175 | } | ~ 7176 | | 7177 | static void mg_mkmd5resp(const char *method, size_t method_len, const char *uri, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7178 | size_t uri_len, const char *ha1, size_t ha1_len, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7179 | const char *nonce, size_t nonce_len, const char *nc, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7180 | size_t nc_len, const char *cnonce, size_t cnonce_len, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7181 | const char *qop, size_t qop_len, char *resp) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7182 | static const char colon[] = ":"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7183 | static const size_t one = 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7184 | char ha2[33]; | ~~~~~~~~~~~~~ 7185 | cs_md5(ha2, method, method_len, colon, one, uri, uri_len, NULL); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7186 | cs_md5(resp, ha1, ha1_len, colon, one, nonce, nonce_len, colon, one, nc, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7187 | nc_len, colon, one, cnonce, cnonce_len, colon, one, qop, qop_len, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7188 | colon, one, ha2, sizeof(ha2) - 1, NULL); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7189 | } | ~ 7190 | | 7191 | int mg_http_create_digest_auth_header(char *buf, size_t buf_len, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7192 | const char *method, const char *uri, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7193 | const char *auth_domain, const char *user, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7194 | const char *passwd, const char *nonce) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7195 | static const char colon[] = ":", qop[] = "auth"; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7196 | static const size_t one = 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7197 | char ha1[33], resp[33], cnonce[40]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7198 | | 7199 | snprintf(cnonce, sizeof(cnonce), "%lx", (unsigned long) mg_time()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7200 | cs_md5(ha1, user, (size_t) strlen(user), colon, one, auth_domain, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7201 | (size_t) strlen(auth_domain), colon, one, passwd, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7202 | (size_t) strlen(passwd), NULL); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7203 | mg_mkmd5resp(method, strlen(method), uri, strlen(uri), ha1, sizeof(ha1) - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7204 | nonce, strlen(nonce), "1", one, cnonce, strlen(cnonce), qop, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7205 | sizeof(qop) - 1, resp); | ~~~~~~~~~~~~~~~~~~~~~~~ 7206 | return snprintf(buf, buf_len, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7207 | "Authorization: Digest username=\"%s\"," | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7208 | "realm=\"%s\",uri=\"%s\",qop=%s,nc=1,cnonce=%s," | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7209 | "nonce=%s,response=%s\r\n", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7210 | user, auth_domain, uri, qop, cnonce, nonce, resp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7211 | } | ~ 7212 | | 7213 | /* | ~~ 7214 | * Check for authentication timeout. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7215 | * Clients send time stamp encoded in nonce. Make sure it is not too old, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7216 | * to prevent replay attacks. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7217 | * Assumption: nonce is a hexadecimal number of seconds since 1970. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7218 | */ | ~~ 7219 | static int mg_check_nonce(const char *nonce) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7220 | unsigned long now = (unsigned long) mg_time(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7221 | unsigned long val = (unsigned long) strtoul(nonce, NULL, 16); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7222 | return (now >= val) && (now - val < 60 * 60); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7223 | } | ~ 7224 | | 7225 | int mg_http_check_digest_auth(struct http_message *hm, const char *auth_domain, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7226 | FILE *fp) { | ~~~~~~~~~~~ 7227 | int ret = 0; | ~~~~~~~~~~~~ 7228 | struct mg_str *hdr; | ~~~~~~~~~~~~~~~~~~~ 7229 | char username_buf[50], cnonce_buf[64], response_buf[40], uri_buf[200], | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7230 | qop_buf[20], nc_buf[20], nonce_buf[16]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7231 | | 7232 | char *username = username_buf, *cnonce = cnonce_buf, *response = response_buf, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7233 | *uri = uri_buf, *qop = qop_buf, *nc = nc_buf, *nonce = nonce_buf; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7234 | | 7235 | /* Parse "Authorization:" header, fail fast on parse error */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7236 | if (hm == NULL || fp == NULL || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7237 | (hdr = mg_get_http_header(hm, "Authorization")) == NULL || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7238 | mg_http_parse_header2(hdr, "username", &username, sizeof(username_buf)) == | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7239 | 0 || | ~~~~ 7240 | mg_http_parse_header2(hdr, "cnonce", &cnonce, sizeof(cnonce_buf)) == 0 || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7241 | mg_http_parse_header2(hdr, "response", &response, sizeof(response_buf)) == | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7242 | 0 || | ~~~~ 7243 | mg_http_parse_header2(hdr, "uri", &uri, sizeof(uri_buf)) == 0 || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7244 | mg_http_parse_header2(hdr, "qop", &qop, sizeof(qop_buf)) == 0 || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7245 | mg_http_parse_header2(hdr, "nc", &nc, sizeof(nc_buf)) == 0 || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7246 | mg_http_parse_header2(hdr, "nonce", &nonce, sizeof(nonce_buf)) == 0 || | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7247 | mg_check_nonce(nonce) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7248 | ret = 0; | ~~~~~~~~ 7249 | goto clean; | ~~~~~~~~~~~ 7250 | } | ~ 7251 | | 7252 | /* NOTE(lsm): due to a bug in MSIE, we do not compare URIs */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7253 | | 7254 | ret = mg_check_digest_auth( | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7255 | hm->method, | ~~~~~~~~~~~ 7256 | mg_mk_str_n( | ~~~~~~~~~~~~ 7257 | hm->uri.p, | ~~~~~~~~~~ 7258 | hm->uri.len + (hm->query_string.len ? hm->query_string.len + 1 : 0)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7259 | mg_mk_str(username), mg_mk_str(cnonce), mg_mk_str(response), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7260 | mg_mk_str(qop), mg_mk_str(nc), mg_mk_str(nonce), mg_mk_str(auth_domain), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7261 | fp); | ~~~~ 7262 | | 7263 | clean: | ~~~~~~ 7264 | if (username != username_buf) MG_FREE(username); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7265 | if (cnonce != cnonce_buf) MG_FREE(cnonce); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7266 | if (response != response_buf) MG_FREE(response); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7267 | if (uri != uri_buf) MG_FREE(uri); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7268 | if (qop != qop_buf) MG_FREE(qop); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7269 | if (nc != nc_buf) MG_FREE(nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7270 | if (nonce != nonce_buf) MG_FREE(nonce); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7271 | | 7272 | return ret; | ~~~~~~~~~~~ 7273 | } | ~ 7274 | | 7275 | int mg_check_digest_auth(struct mg_str method, struct mg_str uri, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7276 | struct mg_str username, struct mg_str cnonce, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7277 | struct mg_str response, struct mg_str qop, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7278 | struct mg_str nc, struct mg_str nonce, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7279 | struct mg_str auth_domain, FILE *fp) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7280 | char buf[128], f_user[sizeof(buf)], f_ha1[sizeof(buf)], f_domain[sizeof(buf)]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7281 | char expected_response[33]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7282 | | 7283 | /* | ~~ 7284 | * Read passwords file line by line. If should have htdigest format, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7285 | * i.e. each line should be a colon-separated sequence: | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7286 | * USER_NAME:DOMAIN_NAME:HA1_HASH_OF_USER_DOMAIN_AND_PASSWORD | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7287 | */ | ~~ 7288 | while (fgets(buf, sizeof(buf), fp) != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7289 | if (sscanf(buf, "%[^:]:%[^:]:%s", f_user, f_domain, f_ha1) == 3 && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7290 | mg_vcmp(&username, f_user) == 0 && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7291 | mg_vcmp(&auth_domain, f_domain) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7292 | /* Username and domain matched, check the password */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7293 | mg_mkmd5resp(method.p, method.len, uri.p, uri.len, f_ha1, strlen(f_ha1), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7294 | nonce.p, nonce.len, nc.p, nc.len, cnonce.p, cnonce.len, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7295 | qop.p, qop.len, expected_response); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7296 | LOG(LL_DEBUG, | ~~~~~~~~~~~~~ 7297 | ("%.*s %s %.*s %s", (int) username.len, username.p, f_domain, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7298 | (int) response.len, response.p, expected_response)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7299 | return mg_ncasecmp(response.p, expected_response, response.len) == 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7300 | } | ~ 7301 | } | ~ 7302 | | 7303 | /* None of the entries in the passwords file matched - return failure */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7304 | return 0; | ~~~~~~~~~ 7305 | } | ~ 7306 | | 7307 | int mg_http_is_authorized(struct http_message *hm, struct mg_str path, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7308 | const char *domain, const char *passwords_file, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7309 | int flags) { | ~~~~~~~~~~~~ 7310 | char buf[MG_MAX_PATH]; | ~~~~~~~~~~~~~~~~~~~~~~ 7311 | const char *p; | ~~~~~~~~~~~~~~ 7312 | FILE *fp; | ~~~~~~~~~ 7313 | int authorized = 1; | ~~~~~~~~~~~~~~~~~~~ 7314 | | 7315 | if (domain != NULL && passwords_file != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7316 | if (flags & MG_AUTH_FLAG_IS_GLOBAL_PASS_FILE) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7317 | fp = mg_fopen(passwords_file, "r"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7318 | } else if (flags & MG_AUTH_FLAG_IS_DIRECTORY) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7319 | snprintf(buf, sizeof(buf), "%.*s%c%s", (int) path.len, path.p, DIRSEP, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7320 | passwords_file); | ~~~~~~~~~~~~~~~~ 7321 | fp = mg_fopen(buf, "r"); | ~~~~~~~~~~~~~~~~~~~~~~~~ 7322 | } else { | ~~~~~~~~ 7323 | p = strrchr(path.p, DIRSEP); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7324 | if (p == NULL) p = path.p; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 7325 | snprintf(buf, sizeof(buf), "%.*s%c%s", (int) (p - path.p), path.p, DIRSEP, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7326 | passwords_file); | ~~~~~~~~~~~~~~~~ 7327 | fp = mg_fopen(buf, "r"); | ~~~~~~~~~~~~~~~~~~~~~~~~ 7328 | } | ~ 7329 | | 7330 | if (fp != NULL) { | ~~~~~~~~~~~~~~~~~ 7331 | authorized = mg_http_check_digest_auth(hm, domain, fp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7332 | fclose(fp); | ~~~~~~~~~~~ 7333 | } else if (!(flags & MG_AUTH_FLAG_ALLOW_MISSING_FILE)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7334 | authorized = 0; | ~~~~~~~~~~~~~~~ 7335 | } | ~ 7336 | } | ~ 7337 | | 7338 | LOG(LL_DEBUG, ("%.*s %s %x %d", (int) path.len, path.p, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7339 | passwords_file ? passwords_file : "", flags, authorized)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7340 | return authorized; | ~~~~~~~~~~~~~~~~~~ 7341 | } | ~ 7342 | #else | ~~~~~ 7343 | int mg_http_is_authorized(struct http_message *hm, const struct mg_str path, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7344 | const char *domain, const char *passwords_file, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7345 | int flags) { | ~~~~~~~~~~~~ 7346 | (void) hm; | ~~~~~~~~~~ 7347 | (void) path; | ~~~~~~~~~~~~ 7348 | (void) domain; | ~~~~~~~~~~~~~~ 7349 | (void) passwords_file; | ~~~~~~~~~~~~~~~~~~~~~~ 7350 | (void) flags; | ~~~~~~~~~~~~~ 7351 | return 1; | ~~~~~~~~~ 7352 | } | ~ 7353 | #endif | ~~~~~~ 7354 | | 7355 | #if MG_ENABLE_DIRECTORY_LISTING | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7356 | static void mg_escape(const char *src, char *dst, size_t dst_len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7357 | size_t n = 0; | ~~~~~~~~~~~~~ 7358 | while (*src != '\0' && n + 5 < dst_len) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7359 | unsigned char ch = *(unsigned char *) src++; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7360 | if (ch == '<') { | ~~~~~~~~~~~~~~~~ 7361 | n += snprintf(dst + n, dst_len - n, "%s", "<"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7362 | } else { | ~~~~~~~~ 7363 | dst[n++] = ch; | ~~~~~~~~~~~~~~ 7364 | } | ~ 7365 | } | ~ 7366 | dst[n] = '\0'; | ~~~~~~~~~~~~~~ 7367 | } | ~ 7368 | | 7369 | static void mg_print_dir_entry(struct mg_connection *nc, const char *file_name, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7370 | cs_stat_t *stp) { | ~~~~~~~~~~~~~~~~~ 7371 | char size[64], mod[64], path[MG_MAX_PATH]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7372 | int64_t fsize = stp->st_size; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7373 | int is_dir = S_ISDIR(stp->st_mode); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7374 | const char *slash = is_dir ? "/" : ""; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7375 | struct mg_str href; | ~~~~~~~~~~~~~~~~~~~ 7376 | | 7377 | if (is_dir) { | ~~~~~~~~~~~~~ 7378 | snprintf(size, sizeof(size), "%s", "[DIRECTORY]"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7379 | } else { | ~~~~~~~~ 7380 | /* | ~~ 7381 | * We use (double) cast below because MSVC 6 compiler cannot | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7382 | * convert unsigned __int64 to double. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7383 | */ | ~~ 7384 | if (fsize < 1024) { | ~~~~~~~~~~~~~~~~~~~ 7385 | snprintf(size, sizeof(size), "%d", (int) fsize); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7386 | } else if (fsize < 0x100000) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7387 | snprintf(size, sizeof(size), "%.1fk", (double) fsize / 1024.0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7388 | } else if (fsize < 0x40000000) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7389 | snprintf(size, sizeof(size), "%.1fM", (double) fsize / 1048576); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7390 | } else { | ~~~~~~~~ 7391 | snprintf(size, sizeof(size), "%.1fG", (double) fsize / 1073741824); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7392 | } | ~ 7393 | } | ~ 7394 | strftime(mod, sizeof(mod), "%d-%b-%Y %H:%M", localtime(&stp->st_mtime)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7395 | mg_escape(file_name, path, sizeof(path)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7396 | href = mg_url_encode(mg_mk_str(file_name)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7397 | mg_printf_http_chunk(nc, | ~~~~~~~~~~~~~~~~~~~~~~~~ 7398 | "%s%s" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7399 | "%s%s\n", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7400 | href.p, slash, path, slash, mod, is_dir ? -1 : fsize, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7401 | size); | ~~~~~~ 7402 | free((void *) href.p); | ~~~~~~~~~~~~~~~~~~~~~~ 7403 | } | ~ 7404 | | 7405 | static void mg_scan_directory(struct mg_connection *nc, const char *dir, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7406 | const struct mg_serve_http_opts *opts, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7407 | void (*func)(struct mg_connection *, const char *, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7408 | cs_stat_t *)) { | ~~~~~~~~~~~~~~~ 7409 | char path[MG_MAX_PATH]; | ~~~~~~~~~~~~~~~~~~~~~~~ 7410 | cs_stat_t st; | ~~~~~~~~~~~~~ 7411 | struct dirent *dp; | ~~~~~~~~~~~~~~~~~~ 7412 | DIR *dirp; | ~~~~~~~~~~ 7413 | | 7414 | LOG(LL_DEBUG, ("%p [%s]", nc, dir)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7415 | if ((dirp = (opendir(dir))) != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7416 | while ((dp = readdir(dirp)) != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7417 | /* Do not show current dir and hidden files */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7418 | if (mg_is_file_hidden((const char *) dp->d_name, opts, 1)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7419 | continue; | ~~~~~~~~~ 7420 | } | ~ 7421 | snprintf(path, sizeof(path), "%s/%s", dir, dp->d_name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7422 | if (mg_stat(path, &st) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7423 | func(nc, (const char *) dp->d_name, &st); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7424 | } | ~ 7425 | } | ~ 7426 | closedir(dirp); | ~~~~~~~~~~~~~~~ 7427 | } else { | ~~~~~~~~ 7428 | LOG(LL_DEBUG, ("%p opendir(%s) -> %d", nc, dir, mg_get_errno())); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7429 | } | ~ 7430 | } | ~ 7431 | | 7432 | static void mg_send_directory_listing(struct mg_connection *nc, const char *dir, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7433 | struct http_message *hm, | ~~~~~~~~~~~~~~~~~~~~~~~~ 7434 | struct mg_serve_http_opts *opts) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7435 | static const char *sort_js_code = | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7436 | ""; | ~~~~~~~~~~~~ 7458 | | 7459 | mg_send_response_line(nc, 200, opts->extra_headers); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7460 | mg_printf(nc, "%s: %s\r\n%s: %s\r\n\r\n", "Transfer-Encoding", "chunked", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7461 | "Content-Type", "text/html; charset=utf-8"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7462 | | 7463 | mg_printf_http_chunk( | ~~~~~~~~~~~~~~~~~~~~~ 7464 | nc, | ~~~ 7465 | "Index of %.*s%s%s" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7466 | "\n" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7468 | "

Index of %.*s

\n" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7469 | "" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7472 | "\n" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7473 | "\n" | ~~~~~~~~~~~~ 7474 | "", | ~~~~~~~~~~~~~~~~ 7475 | (int) hm->uri.len, hm->uri.p, sort_js_code, sort_js_code2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7476 | (int) hm->uri.len, hm->uri.p); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7477 | mg_scan_directory(nc, dir, opts, mg_print_dir_entry); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7478 | mg_printf_http_chunk(nc, | ~~~~~~~~~~~~~~~~~~~~~~~~ 7479 | "\n" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7480 | "
Name" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7470 | "Modified" | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7471 | "Size


\n" | ~~~~~~~~~~~~ 7481 | "
%s
\n" | ~~~~~~~~~~~~~~~~~~~~~~~~~ 7482 | "", | ~~~~~~~~~~~~~~~~~ 7483 | mg_version_header); | ~~~~~~~~~~~~~~~~~~~ 7484 | mg_send_http_chunk(nc, "", 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7485 | /* TODO(rojer): Remove when cesanta/dev/issues/197 is fixed. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7486 | nc->flags |= MG_F_SEND_AND_CLOSE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7487 | } | ~ 7488 | #endif /* MG_ENABLE_DIRECTORY_LISTING */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7489 | | 7490 | /* | ~~ 7491 | * Given a directory path, find one of the files specified in the | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7492 | * comma-separated list of index files `list`. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7493 | * First found index file wins. If an index file is found, then gets | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7494 | * appended to the `path`, stat-ed, and result of `stat()` passed to `stp`. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7495 | * If index file is not found, then `path` and `stp` remain unchanged. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7496 | */ | ~~ 7497 | MG_INTERNAL void mg_find_index_file(const char *path, const char *list, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7498 | char **index_file, cs_stat_t *stp) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7499 | struct mg_str vec; | ~~~~~~~~~~~~~~~~~~ 7500 | size_t path_len = strlen(path); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7501 | int found = 0; | ~~~~~~~~~~~~~~ 7502 | *index_file = NULL; | ~~~~~~~~~~~~~~~~~~~ 7503 | | 7504 | /* Traverse index files list. For each entry, append it to the given */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7505 | /* path and see if the file exists. If it exists, break the loop */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7506 | while ((list = mg_next_comma_list_entry(list, &vec, NULL)) != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7507 | cs_stat_t st; | ~~~~~~~~~~~~~ 7508 | size_t len = path_len + 1 + vec.len + 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7509 | *index_file = (char *) MG_REALLOC(*index_file, len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7510 | if (*index_file == NULL) break; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7511 | snprintf(*index_file, len, "%s%c%.*s", path, DIRSEP, (int) vec.len, vec.p); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7512 | | 7513 | /* Does it exist? Is it a file? */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7514 | if (mg_stat(*index_file, &st) == 0 && S_ISREG(st.st_mode)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7515 | /* Yes it does, break the loop */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7516 | *stp = st; | ~~~~~~~~~~ 7517 | found = 1; | ~~~~~~~~~~ 7518 | break; | ~~~~~~ 7519 | } | ~ 7520 | } | ~ 7521 | if (!found) { | ~~~~~~~~~~~~~ 7522 | MG_FREE(*index_file); | ~~~~~~~~~~~~~~~~~~~~~ 7523 | *index_file = NULL; | ~~~~~~~~~~~~~~~~~~~ 7524 | } | ~ 7525 | LOG(LL_DEBUG, ("[%s] [%s]", path, (*index_file ? *index_file : ""))); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7526 | } | ~ 7527 | | 7528 | #if MG_ENABLE_HTTP_URL_REWRITES | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7529 | static int mg_http_send_port_based_redirect( | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7530 | struct mg_connection *c, struct http_message *hm, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7531 | const struct mg_serve_http_opts *opts) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7532 | const char *rewrites = opts->url_rewrites; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7533 | struct mg_str a, b; | ~~~~~~~~~~~~~~~~~~~ 7534 | char local_port[20] = {'%'}; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7535 | | 7536 | mg_conn_addr_to_str(c, local_port + 1, sizeof(local_port) - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7537 | MG_SOCK_STRINGIFY_PORT); | ~~~~~~~~~~~~~~~~~~~~~~~~ 7538 | | 7539 | while ((rewrites = mg_next_comma_list_entry(rewrites, &a, &b)) != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7540 | if (mg_vcmp(&a, local_port) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7541 | mg_send_response_line(c, 301, NULL); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7542 | mg_printf(c, "Content-Length: 0\r\nLocation: %.*s%.*s\r\n\r\n", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7543 | (int) b.len, b.p, (int) (hm->proto.p - hm->uri.p - 1), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7544 | hm->uri.p); | ~~~~~~~~~~~ 7545 | return 1; | ~~~~~~~~~ 7546 | } | ~ 7547 | } | ~ 7548 | | 7549 | return 0; | ~~~~~~~~~ 7550 | } | ~ 7551 | | 7552 | static void mg_reverse_proxy_handler(struct mg_connection *nc, int ev, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7553 | void *ev_data MG_UD_ARG(void *user_data)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7554 | struct http_message *hm = (struct http_message *) ev_data; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7555 | struct mg_http_proto_data *pd = mg_http_get_proto_data(nc); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7556 | | 7557 | if (pd == NULL || pd->reverse_proxy_data.linked_conn == NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7558 | DBG(("%p: upstream closed", nc)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7559 | return; | ~~~~~~~ 7560 | } | ~ 7561 | | 7562 | switch (ev) { | ~~~~~~~~~~~~~ 7563 | case MG_EV_CONNECT: | ~~~~~~~~~~~~~~~~~~~ 7564 | if (*(int *) ev_data != 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7565 | mg_http_send_error(pd->reverse_proxy_data.linked_conn, 502, NULL); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7566 | } | ~ 7567 | break; | ~~~~~~ 7568 | /* TODO(mkm): handle streaming */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7569 | case MG_EV_HTTP_REPLY: | ~~~~~~~~~~~~~~~~~~~~~~ 7570 | mg_send(pd->reverse_proxy_data.linked_conn, hm->message.p, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7571 | hm->message.len); | ~~~~~~~~~~~~~~~~~ 7572 | pd->reverse_proxy_data.linked_conn->flags |= MG_F_SEND_AND_CLOSE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7573 | nc->flags |= MG_F_CLOSE_IMMEDIATELY; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7574 | break; | ~~~~~~ 7575 | case MG_EV_CLOSE: | ~~~~~~~~~~~~~~~~~ 7576 | pd->reverse_proxy_data.linked_conn->flags |= MG_F_SEND_AND_CLOSE; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7577 | break; | ~~~~~~ 7578 | } | ~ 7579 | | 7580 | #if MG_ENABLE_CALLBACK_USERDATA | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7581 | (void) user_data; | ~~~~~~~~~~~~~~~~~ 7582 | #endif | ~~~~~~ 7583 | } | ~ 7584 | | 7585 | void mg_http_reverse_proxy(struct mg_connection *nc, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7586 | const struct http_message *hm, struct mg_str mount, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7587 | struct mg_str upstream) { | ~~~~~~~~~~~~~~~~~~~~~~~~~ 7588 | struct mg_connection *be; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 7589 | char burl[256], *purl = burl; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7590 | int i; | ~~~~~~ 7591 | const char *error; | ~~~~~~~~~~~~~~~~~~ 7592 | struct mg_connect_opts opts; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7593 | struct mg_str path = MG_NULL_STR, user_info = MG_NULL_STR, host = MG_NULL_STR; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7594 | memset(&opts, 0, sizeof(opts)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7595 | opts.error_string = &error; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7596 | | 7597 | mg_asprintf(&purl, sizeof(burl), "%.*s%.*s", (int) upstream.len, upstream.p, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7598 | (int) (hm->uri.len - mount.len), hm->uri.p + mount.len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7599 | | 7600 | be = mg_connect_http_base(nc->mgr, MG_CB(mg_reverse_proxy_handler, NULL), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7601 | opts, "http", NULL, "https", NULL, purl, &path, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7602 | &user_info, &host); | ~~~~~~~~~~~~~~~~~~~ 7603 | LOG(LL_DEBUG, ("Proxying %.*s to %s (rule: %.*s)", (int) hm->uri.len, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7604 | hm->uri.p, purl, (int) mount.len, mount.p)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7605 | | 7606 | if (be == NULL) { | ~~~~~~~~~~~~~~~~~ 7607 | LOG(LL_ERROR, ("Error connecting to %s: %s", purl, error)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7608 | mg_http_send_error(nc, 502, NULL); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7609 | goto cleanup; | ~~~~~~~~~~~~~ 7610 | } | ~ 7611 | | 7612 | /* link connections to each other, they must live and die together */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7613 | mg_http_get_proto_data(be)->reverse_proxy_data.linked_conn = nc; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7614 | mg_http_get_proto_data(nc)->reverse_proxy_data.linked_conn = be; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7615 | | 7616 | /* send request upstream */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7617 | mg_printf(be, "%.*s %.*s HTTP/1.1\r\n", (int) hm->method.len, hm->method.p, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7618 | (int) path.len, path.p); | ~~~~~~~~~~~~~~~~~~~~~~~~ 7619 | | 7620 | mg_printf(be, "Host: %.*s\r\n", (int) host.len, host.p); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7621 | for (i = 0; i < MG_MAX_HTTP_HEADERS && hm->header_names[i].len > 0; i++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7622 | struct mg_str hn = hm->header_names[i]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7623 | struct mg_str hv = hm->header_values[i]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7624 | | 7625 | /* we rewrite the host header */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7626 | if (mg_vcasecmp(&hn, "Host") == 0) continue; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7627 | /* | ~~ 7628 | * Don't pass chunked transfer encoding to the client because hm->body is | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7629 | * already dechunked when we arrive here. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7630 | */ | ~~ 7631 | if (mg_vcasecmp(&hn, "Transfer-encoding") == 0 && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7632 | mg_vcasecmp(&hv, "chunked") == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7633 | mg_printf(be, "Content-Length: %" SIZE_T_FMT "\r\n", hm->body.len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7634 | continue; | ~~~~~~~~~ 7635 | } | ~ 7636 | /* We don't support proxying Expect: 100-continue. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7637 | if (mg_vcasecmp(&hn, "Expect") == 0 && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7638 | mg_vcasecmp(&hv, "100-continue") == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7639 | continue; | ~~~~~~~~~ 7640 | } | ~ 7641 | | 7642 | mg_printf(be, "%.*s: %.*s\r\n", (int) hn.len, hn.p, (int) hv.len, hv.p); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7643 | } | ~ 7644 | | 7645 | mg_send(be, "\r\n", 2); | ~~~~~~~~~~~~~~~~~~~~~~~ 7646 | mg_send(be, hm->body.p, hm->body.len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7647 | | 7648 | cleanup: | ~~~~~~~~ 7649 | if (purl != burl) MG_FREE(purl); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7650 | } | ~ 7651 | | 7652 | static int mg_http_handle_forwarding(struct mg_connection *nc, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7653 | struct http_message *hm, | ~~~~~~~~~~~~~~~~~~~~~~~~ 7654 | const struct mg_serve_http_opts *opts) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7655 | const char *rewrites = opts->url_rewrites; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7656 | struct mg_str a, b; | ~~~~~~~~~~~~~~~~~~~ 7657 | struct mg_str p1 = MG_MK_STR("http://"), p2 = MG_MK_STR("https://"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7658 | | 7659 | while ((rewrites = mg_next_comma_list_entry(rewrites, &a, &b)) != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7660 | if (mg_strncmp(a, hm->uri, a.len) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7661 | if (mg_strncmp(b, p1, p1.len) == 0 || mg_strncmp(b, p2, p2.len) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7662 | mg_http_reverse_proxy(nc, hm, a, b); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7663 | return 1; | ~~~~~~~~~ 7664 | } | ~ 7665 | } | ~ 7666 | } | ~ 7667 | | 7668 | return 0; | ~~~~~~~~~ 7669 | } | ~ 7670 | #endif /* MG_ENABLE_FILESYSTEM */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7671 | | 7672 | MG_INTERNAL int mg_uri_to_local_path(struct http_message *hm, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7673 | const struct mg_serve_http_opts *opts, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7674 | char **local_path, | ~~~~~~~~~~~~~~~~~~ 7675 | struct mg_str *remainder) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7676 | int ok = 1; | ~~~~~~~~~~~ 7677 | const char *cp = hm->uri.p, *cp_end = hm->uri.p + hm->uri.len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7678 | struct mg_str root = {NULL, 0}; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7679 | const char *file_uri_start = cp; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7680 | *local_path = NULL; | ~~~~~~~~~~~~~~~~~~~ 7681 | remainder->p = NULL; | ~~~~~~~~~~~~~~~~~~~~ 7682 | remainder->len = 0; | ~~~~~~~~~~~~~~~~~~~ 7683 | | 7684 | { /* 1. Determine which root to use. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7685 | | 7686 | #if MG_ENABLE_HTTP_URL_REWRITES | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7687 | const char *rewrites = opts->url_rewrites; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7688 | #else | ~~~~~ 7689 | const char *rewrites = ""; | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 7690 | #endif | ~~~~~~ 7691 | struct mg_str *hh = mg_get_http_header(hm, "Host"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7692 | struct mg_str a, b; | ~~~~~~~~~~~~~~~~~~~ 7693 | /* Check rewrites first. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7694 | while ((rewrites = mg_next_comma_list_entry(rewrites, &a, &b)) != NULL) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7695 | if (a.len > 1 && a.p[0] == '@') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7696 | /* Host rewrite. */ | ~~~~~~~~~~~~~~~~~~~ 7697 | if (hh != NULL && hh->len == a.len - 1 && | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7698 | mg_ncasecmp(a.p + 1, hh->p, a.len - 1) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7699 | root = b; | ~~~~~~~~~ 7700 | break; | ~~~~~~ 7701 | } | ~ 7702 | } else { | ~~~~~~~~ 7703 | /* Regular rewrite, URI=directory */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7704 | size_t match_len = mg_match_prefix_n(a, hm->uri); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7705 | if (match_len > 0) { | ~~~~~~~~~~~~~~~~~~~~ 7706 | file_uri_start = hm->uri.p + match_len; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7707 | if (*file_uri_start == '/' || file_uri_start == cp_end) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7708 | /* Match ended at component boundary, ok. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7709 | } else if (*(file_uri_start - 1) == '/') { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7710 | /* Pattern ends with '/', backtrack. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7711 | file_uri_start--; | ~~~~~~~~~~~~~~~~~ 7712 | } else { | ~~~~~~~~ 7713 | /* No match: must fall on the component boundary. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7714 | continue; | ~~~~~~~~~ 7715 | } | ~ 7716 | root = b; | ~~~~~~~~~ 7717 | break; | ~~~~~~ 7718 | } | ~ 7719 | } | ~ 7720 | } | ~ 7721 | /* If no rewrite rules matched, use DAV or regular document root. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7722 | if (root.p == NULL) { | ~~~~~~~~~~~~~~~~~~~~~ 7723 | #if MG_ENABLE_HTTP_WEBDAV | ~~~~~~~~~~~~~~~~~~~~~~~~~ 7724 | if (opts->dav_document_root != NULL && mg_is_dav_request(&hm->method)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7725 | root.p = opts->dav_document_root; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7726 | root.len = strlen(opts->dav_document_root); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7727 | } else | ~~~~~~ 7728 | #endif | ~~~~~~ 7729 | { | ~ 7730 | root.p = opts->document_root; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7731 | root.len = strlen(opts->document_root); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7732 | } | ~ 7733 | } | ~ 7734 | assert(root.p != NULL && root.len > 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7735 | } | ~ 7736 | | 7737 | { /* 2. Find where in the canonical URI path the local path ends. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7738 | const char *u = file_uri_start + 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7739 | char *lp = (char *) MG_MALLOC(root.len + hm->uri.len + 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7740 | char *lp_end = lp + root.len + hm->uri.len + 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7741 | char *p = lp, *ps; | ~~~~~~~~~~~~~~~~~~ 7742 | int exists = 1; | ~~~~~~~~~~~~~~~ 7743 | if (lp == NULL) { | ~~~~~~~~~~~~~~~~~ 7744 | ok = 0; | ~~~~~~~ 7745 | goto out; | ~~~~~~~~~ 7746 | } | ~ 7747 | memcpy(p, root.p, root.len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7748 | p += root.len; | ~~~~~~~~~~~~~~ 7749 | if (*(p - 1) == DIRSEP) p--; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7750 | *p = '\0'; | ~~~~~~~~~~ 7751 | ps = p; | ~~~~~~~ 7752 | | 7753 | /* Chop off URI path components one by one and build local path. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7754 | while (u <= cp_end) { | ~~~~~~~~~~~~~~~~~~~~~ 7755 | const char *next = u; | ~~~~~~~~~~~~~~~~~~~~~ 7756 | struct mg_str component; | ~~~~~~~~~~~~~~~~~~~~~~~~ 7757 | if (exists) { | ~~~~~~~~~~~~~ 7758 | cs_stat_t st; | ~~~~~~~~~~~~~ 7759 | exists = (mg_stat(lp, &st) == 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7760 | if (exists && S_ISREG(st.st_mode)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7761 | /* We found the terminal, the rest of the URI (if any) is path_info. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7762 | */ | ~~ 7763 | if (*(u - 1) == '/') u--; | ~~~~~~~~~~~~~~~~~~~~~~~~~ 7764 | break; | ~~~~~~ 7765 | } | ~ 7766 | } | ~ 7767 | if (u >= cp_end) break; | ~~~~~~~~~~~~~~~~~~~~~~~ 7768 | parse_uri_component((const char **) &next, cp_end, "/", &component); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7769 | if (component.len > 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~ 7770 | int len; | ~~~~~~~~ 7771 | memmove(p + 1, component.p, component.len); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7772 | len = mg_url_decode(p + 1, component.len, p + 1, lp_end - p - 1, 0); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7773 | if (len <= 0) { | ~~~~~~~~~~~~~~~ 7774 | ok = 0; | ~~~~~~~ 7775 | break; | ~~~~~~ 7776 | } | ~ 7777 | component.p = p + 1; | ~~~~~~~~~~~~~~~~~~~~ 7778 | component.len = len; | ~~~~~~~~~~~~~~~~~~~~ 7779 | if (mg_vcmp(&component, ".") == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7780 | /* Yum. */ | ~~~~~~~~~~ 7781 | } else if (mg_vcmp(&component, "..") == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7782 | while (p > ps && *p != DIRSEP) p--; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7783 | *p = '\0'; | ~~~~~~~~~~ 7784 | } else { | ~~~~~~~~ 7785 | size_t i; | ~~~~~~~~~ 7786 | #ifdef _WIN32 | ~~~~~~~~~~~~~ 7787 | /* On Windows, make sure it's valid Unicode (no funny stuff). */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7788 | wchar_t buf[MG_MAX_PATH * 2]; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7789 | if (to_wchar(component.p, buf, MG_MAX_PATH) == 0) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7790 | DBG(("[%.*s] smells funny", (int) component.len, component.p)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7791 | ok = 0; | ~~~~~~~ 7792 | break; | ~~~~~~ 7793 | } | ~ 7794 | #endif | ~~~~~~ 7795 | *p++ = DIRSEP; | ~~~~~~~~~~~~~~ 7796 | /* No NULs and DIRSEPs in the component (percent-encoded). */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7797 | for (i = 0; i < component.len; i++, p++) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7798 | if (*p == '\0' || *p == DIRSEP | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7799 | #ifdef _WIN32 | ~~~~~~~~~~~~~ 7800 | /* On Windows, "/" is also accepted, so check for that too. */ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7801 | || | ~~ 7802 | *p == '/' | ~~~~~~~~~ 7803 | #endif | ~~~~~~ 7804 | ) { | ~~~ 7805 | ok = 0; | ~~~~~~~ 7806 | break; | ~~~~~~ 7807 | } | ~ 7808 | } | ~ 7809 | } | ~ 7810 | } | ~ 7811 | u = next; | ~~~~~~~~~ 7812 | } | ~ 7813 | if (ok) { | ~~~~~~~~~ 7814 | *local_path = lp; | ~~~~~~~~~~~~~~~~~ 7815 | if (u > cp_end) u = cp_end; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7816 | remainder->p = u; | ~~~~~~~~~~~~~~~~~ 7817 | remainder->len = cp_end - u; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7818 | } else { | ~~~~~~~~ 7819 | MG_FREE(lp); | ~~~~~~~~~~~~ 7820 | } | ~ 7821 | } | ~ 7822 | | 7823 | out: | ~~~~ 7824 | LOG(LL_DEBUG, | ~~~~~~~~~~~~~ 7825 | ("'%.*s' -> '%s' + '%.*s'", (int) hm->uri.len, hm->uri.p, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7826 | *local_path ? *local_path : "", (int) remainder->len, remainder->p)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mongoose.c:7824:3: note: in expansion of macro 'LOG' 7824 | LOG(LL_DEBUG, | ^~~ mongoose.c: In function 'mg_serve_http': mongoose.c:7825:27: note: format string is defined here 7825 | ("'%.*s' -> '%s' + '%.*s'", (int) hm->uri.len, hm->uri.p, | ^~~~ cc1: all warnings being treated as errors make[1]: *** [Makefile:20: simple_web_server] Error 1 make[1]: Leaving directory '/usr/src/RPM/BUILD/smplayer-19.5.0.9214/webserver' make: *** [Makefile:31: webserver/simple_web_server] Error 2 make: Leaving directory '/usr/src/RPM/BUILD/smplayer-19.5.0.9214' error: Bad exit status from /usr/src/tmp/rpm-tmp.85635 (%install) RPM build errors: Bad exit status from /usr/src/tmp/rpm-tmp.85635 (%install) Command exited with non-zero status 1 756.10user 42.41system 19:23.04elapsed 68%CPU (0avgtext+0avgdata 392604maxresident)k 0inputs+0outputs (0major+8522430minor)pagefaults 0swaps hsh-rebuild: rebuild of `kde5-smplayer-19.5.0.9214-alt1.src.rpm' failed. Command exited with non-zero status 1 776.01user 49.04system 19:52.01elapsed 69%CPU (0avgtext+0avgdata 392604maxresident)k 25224inputs+0outputs (0major+8842798minor)pagefaults 0swaps