summaryrefslogtreecommitdiff
path: root/mugglei.c
diff options
context:
space:
mode:
Diffstat (limited to 'mugglei.c')
-rwxr-xr-xmugglei.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/mugglei.c b/mugglei.c
index 76cf7a4..a0f9a68 100755
--- a/mugglei.c
+++ b/mugglei.c
@@ -14,15 +14,8 @@
#include <stdio.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include <mysql/mysql.h>
#include <getopt.h>
-/*extern "C"
-{*/
- #include <stdarg.h>
- #include <stdio.h>
-/*}
-*/
-#include <stdlib.h>
+#include <stdarg.h>
#include <tag.h>
#include <mpegfile.h>
@@ -126,27 +119,27 @@ int main( int argc, char *argv[] )
} break;
case 'h':
{
- the_setup.DbHost = optarg;
+ the_setup.DbHost = strdup(optarg);
} break;
case 'n':
{
- the_setup.DbName = optarg;
+ the_setup.DbName = strdup(optarg);
} break;
case 'u':
{
- the_setup.DbUser = optarg;
+ the_setup.DbUser = strdup(optarg);
} break;
case 'p':
{
- the_setup.DbPass = optarg;
+ the_setup.DbPass = strdup(optarg);
} break;
case 's':
{
- the_setup.DbSocket = optarg;
+ the_setup.DbSocket = strdup(optarg);
} break;
case 't':
{
- the_setup.ToplevelDir = optarg;
+ the_setup.ToplevelDir = strdup(optarg);
} break;
case 'z':
{
@@ -168,7 +161,7 @@ int main( int argc, char *argv[] )
#endif
}
}
- mgSync *sync = new mgSync; // because we want to delete it before database_end
+ mgDbGd *sync = new mgDbGd; // because we want to delete it before database_end
if (create_mode)
sync->Create();
if (optind<argc)