@@ -990,52 +990,51 @@ namespace global {
990990
991991static int main2 (int argc, char **argv)
992992{
993- int ret = EXIT_FAILURE;
994- if (strcmp (argv[0 ], " delmsg" ) == 0 ) {
995- ret = delmsg::main (argc, argv);
996- } else if (strcmp (argv[0 ], " emptyfld" ) == 0 ) {
997- ret = emptyfld::main (argc, argv);
998- } else if (strcmp (argv[0 ], " clear-photo" ) == 0 ) {
999- ret = delstoreprop (argc, argv, PSETID_Gromox, " photo" , PT_BINARY);
1000- } else if (strcmp (argv[0 ], " clear-profile" ) == 0 ) {
1001- ret = delstoreprop (argc, argv, PSETID_Gromox, " zcore_profsect" , PT_BINARY);
993+ if (strcmp (argv[0 ], " delmsg" ) == 0 )
994+ return delmsg::main (argc, argv);
995+ else if (strcmp (argv[0 ], " emptyfld" ) == 0 )
996+ return emptyfld::main (argc, argv);
997+ else if (strcmp (argv[0 ], " clear-photo" ) == 0 )
998+ return delstoreprop (argc, argv, PSETID_Gromox, " photo" , PT_BINARY);
999+ else if (strcmp (argv[0 ], " clear-rwz" ) == 0 )
1000+ return clear_rwz ();
1001+ else if (strcmp (argv[0 ], " get-photo" ) == 0 )
1002+ return showstoreprop (argc, argv, PSETID_Gromox, " photo" , PT_BINARY);
1003+ else if (strcmp (argv[0 ], " set-photo" ) == 0 )
1004+ return setstoreprop (argc, argv, PSETID_Gromox, " photo" , PT_BINARY);
1005+ else if (strcmp (argv[0 ], " get-websettings" ) == 0 )
1006+ return showstoreprop (argc, argv, PSETID_Gromox, " websettings" , PT_UNICODE);
1007+ else if (strcmp (argv[0 ], " set-websettings" ) == 0 )
1008+ return setstoreprop (argc, argv, PSETID_Gromox, " websettings" , PT_UNICODE);
1009+ else if (strcmp (argv[0 ], " get-websettings-persistent" ) == 0 )
1010+ return showstoreprop (argc, argv, PSETID_Gromox, " websettings_persistent" , PT_UNICODE);
1011+ else if (strcmp (argv[0 ], " set-websettings-persistent" ) == 0 )
1012+ return setstoreprop (argc, argv, PSETID_Gromox, " websettings_persistent" , PT_UNICODE);
1013+ else if (strcmp (argv[0 ], " get-websettings-recipients" ) == 0 )
1014+ return showstoreprop (argc, argv, PSETID_Gromox, " websettings_recipienthistory" , PT_UNICODE);
1015+ else if (strcmp (argv[0 ], " set-websettings-recipients" ) == 0 )
1016+ return setstoreprop (argc, argv, PSETID_Gromox, " websettings_recipienthistory" , PT_UNICODE);
1017+ else if (strcmp (argv[0 ], " purge-softdelete" ) == 0 )
1018+ return purgesoftdel::main (argc, argv);
1019+ else if (strcmp (argv[0 ], " set-locale" ) == 0 )
1020+ return set_locale::main (argc, argv);
1021+ else if (strcmp (argv[0 ], " get-freebusy" ) == 0 || strcmp (argv[0 ], " gfb" ) == 0 )
1022+ return getfreebusy::main (argc, argv);
1023+
1024+ if (strcmp (argv[0 ], " clear-profile" ) == 0 ) {
1025+ auto ret = delstoreprop (argc, argv, PSETID_Gromox, " zcore_profsect" , PT_BINARY);
10021026 if (ret == 0 )
1003- ret = delstoreprop (argc, argv, PSETID_Gromox, " websettings" , PT_UNICODE);
1027+ return delstoreprop (argc, argv, PSETID_Gromox, " websettings" , PT_UNICODE);
10041028 if (ret == 0 )
1005- ret = delstoreprop (argc, argv, PSETID_Gromox, " websettings_persistent" , PT_UNICODE);
1029+ return delstoreprop (argc, argv, PSETID_Gromox, " websettings_persistent" , PT_UNICODE);
10061030 if (ret == 0 )
1007- ret = delstoreprop (argc, argv, PSETID_Gromox, " websettings_recipienthistory" , PT_UNICODE);
1008- } else if (strcmp (argv[0 ], " clear-rwz" ) == 0 ) {
1009- ret = clear_rwz ();
1010- } else if (strcmp (argv[0 ], " get-photo" ) == 0 ) {
1011- ret = showstoreprop (argc, argv, PSETID_Gromox, " photo" , PT_BINARY);
1012- } else if (strcmp (argv[0 ], " set-photo" ) == 0 ) {
1013- ret = setstoreprop (argc, argv, PSETID_Gromox, " photo" , PT_BINARY);
1014- } else if (strcmp (argv[0 ], " get-websettings" ) == 0 ) {
1015- ret = showstoreprop (argc, argv, PSETID_Gromox, " websettings" , PT_UNICODE);
1016- } else if (strcmp (argv[0 ], " set-websettings" ) == 0 ) {
1017- ret = setstoreprop (argc, argv, PSETID_Gromox, " websettings" , PT_UNICODE);
1018- } else if (strcmp (argv[0 ], " get-websettings-persistent" ) == 0 ) {
1019- ret = showstoreprop (argc, argv, PSETID_Gromox, " websettings_persistent" , PT_UNICODE);
1020- } else if (strcmp (argv[0 ], " set-websettings-persistent" ) == 0 ) {
1021- ret = setstoreprop (argc, argv, PSETID_Gromox, " websettings_persistent" , PT_UNICODE);
1022- } else if (strcmp (argv[0 ], " get-websettings-recipients" ) == 0 ) {
1023- ret = showstoreprop (argc, argv, PSETID_Gromox, " websettings_recipienthistory" , PT_UNICODE);
1024- } else if (strcmp (argv[0 ], " set-websettings-recipients" ) == 0 ) {
1025- ret = setstoreprop (argc, argv, PSETID_Gromox, " websettings_recipienthistory" , PT_UNICODE);
1026- } else if (strcmp (argv[0 ], " purge-softdelete" ) == 0 ) {
1027- ret = purgesoftdel::main (argc, argv);
1028- } else if (strcmp (argv[0 ], " set-locale" ) == 0 ) {
1029- ret = set_locale::main (argc, argv);
1030- } else if (strcmp (argv[0 ], " get-freebusy" ) == 0 || strcmp (argv[0 ], " gfb" ) == 0 ) {
1031- ret = getfreebusy::main (argc, argv);
1031+ return delstoreprop (argc, argv, PSETID_Gromox, " websettings_recipienthistory" , PT_UNICODE);
1032+ return ret;
10321033 } else if (strcmp (argv[0 ], " echo-username" ) == 0 ) {
10331034 printf (" %s\n " , g_dstuser.c_str ());
1034- ret = EXIT_SUCCESS;
1035- } else {
1036- ret = simple_rpc::main (argc, argv);
1035+ return EXIT_SUCCESS;
10371036 }
1038- return ret ;
1037+ return simple_rpc::main (argc, argv) ;
10391038}
10401039
10411040}
0 commit comments