File vtorrent-init.patch of Package vtorrent

--- src/init.cpp	2016-08-22 01:48:06.000000000 +0200
+++ init.cpp	2016-08-22 13:12:27.394845959 +0200
@@ -179,85 +179,85 @@
 //
 // Start
 //
-#if !defined(QT_GUI)
-bool AppInit(int argc, char* argv[])
-{
-    bool fRet = false;
-    try
-    {
-        //
-        // Parameters
-        //
-        // If Qt is used, parameters/bitcoin.conf are parsed in qt/bitcoin.cpp's main()
-        ParseParameters(argc, argv);
-        if (!boost::filesystem::is_directory(GetDataDir(false)))
-        {
-            fprintf(stderr, "Error: Specified directory does not exist\n");
-            Shutdown();
-        };
-
-        ReadConfigFile(mapArgs, mapMultiArgs);
-
-        if (mapArgs.count("-?") || mapArgs.count("--help"))
-        {
-            // First part of help message is specific to bitcoind / RPC client
-            std::string strUsage = _("vTorrent version") + " " + FormatFullVersion() + "\n\n" +
-                _("Usage:") + "\n" +
-                  "  vTorrentd [options]                     " + "\n" +
-                  "  vTorrentd [options] <command> [params]  " + _("Send command to -server or vTorrentd") + "\n" +
-                  "  vTorrentd [options] help                " + _("List commands") + "\n" +
-                  "  vTorrentd [options] help <command>      " + _("Get help for a command") + "\n";
-
-            strUsage += "\n" + HelpMessage();
-
-            fprintf(stdout, "%s", strUsage.c_str());
-            return false;
-        };
-
-        // Command-line RPC
-        for (int i = 1; i < argc; i++)
-            if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "vTorrent:"))
-                fCommandLine = true;
-
-        if (fCommandLine)
-        {
-            int ret = CommandLineRPC(argc, argv);
-            exit(ret);
-        };
-
-        boost::thread_group threadGroup;
-
-        fRet = AppInit2(threadGroup);
-    } catch (std::exception& e)
-    {
-        PrintException(&e, "AppInit()");
-    } catch (...)
-    {
-        PrintException(NULL, "AppInit()");
-    };
-
-    if (!fRet)
-        Shutdown();
-
-    return fRet;
-}
-
-extern void noui_connect();
-int main(int argc, char* argv[])
-{
-    bool fRet = false;
-
-    // Connect bitcoind signal handlers
-    noui_connect();
-
-    fRet = AppInit(argc, argv);
-
-    if (fRet && fDaemon)
-        return 0;
-
-    return 1;
-}
-#endif
+// #if !defined(QT_GUI)
+// bool AppInit(int argc, char* argv[])
+// {
+//     bool fRet = false;
+//     try
+//     {
+//         //
+//         // Parameters
+//         //
+//         // If Qt is used, parameters/bitcoin.conf are parsed in qt/bitcoin.cpp's main()
+//         ParseParameters(argc, argv);
+//         if (!boost::filesystem::is_directory(GetDataDir(false)))
+//         {
+//             fprintf(stderr, "Error: Specified directory does not exist\n");
+//             Shutdown();
+//         };
+// 
+//         ReadConfigFile(mapArgs, mapMultiArgs);
+// 
+//         if (mapArgs.count("-?") || mapArgs.count("--help"))
+//         {
+//             // First part of help message is specific to bitcoind / RPC client
+//             std::string strUsage = _("vTorrent version") + " " + FormatFullVersion() + "\n\n" +
+//                 _("Usage:") + "\n" +
+//                   "  vTorrentd [options]                     " + "\n" +
+//                   "  vTorrentd [options] <command> [params]  " + _("Send command to -server or vTorrentd") + "\n" +
+//                   "  vTorrentd [options] help                " + _("List commands") + "\n" +
+//                   "  vTorrentd [options] help <command>      " + _("Get help for a command") + "\n";
+// 
+//             strUsage += "\n" + HelpMessage();
+// 
+//             fprintf(stdout, "%s", strUsage.c_str());
+//             return false;
+//         };
+// 
+//         // Command-line RPC
+//         for (int i = 1; i < argc; i++)
+//             if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "vTorrent:"))
+//                 fCommandLine = true;
+// 
+//         if (fCommandLine)
+//         {
+//             int ret = CommandLineRPC(argc, argv);
+//             exit(ret);
+//         };
+// 
+//         boost::thread_group threadGroup;
+// 
+//         fRet = AppInit2(threadGroup);
+//     } catch (std::exception& e)
+//     {
+//         PrintException(&e, "AppInit()");
+//     } catch (...)
+//     {
+//         PrintException(NULL, "AppInit()");
+//     };
+// 
+//     if (!fRet)
+//         Shutdown();
+// 
+//     return fRet;
+// }
+
+// extern void noui_connect();
+// int main(int argc, char* argv[])
+// {
+//     bool fRet = false;
+// 
+//     // Connect bitcoind signal handlers
+//     noui_connect();
+// 
+//     fRet = AppInit(argc, argv);
+// 
+//     if (fRet && fDaemon)
+//         return 0;
+// 
+//     return 1;
+// }
+// #endif
 
 bool static InitError(const std::string &str)
 {
openSUSE Build Service is sponsored by