Fossil SCM

Fix source code formatting in winhttp.c.

drh 2012-10-23 13:54 trunk
Commit 9d8bdc90f9f15e4eec30b8a32a1bb5db91b288b6
1 file changed +10 -7
+10 -7
--- src/winhttp.c
+++ src/winhttp.c
@@ -624,22 +624,22 @@
624624
/* Create the service. */
625625
hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);
626626
if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
627627
hSvc = CreateServiceW(
628628
hScm, /* Handle to the SCM */
629
- fossil_utf8_to_unicode(zSvcName), /* Name of the service */
630
- fossil_utf8_to_unicode(zDisplay), /* Display name */
629
+ fossil_utf8_to_unicode(zSvcName), /* Name of the service */
630
+ fossil_utf8_to_unicode(zDisplay), /* Display name */
631631
SERVICE_ALL_ACCESS, /* Desired access */
632632
SERVICE_WIN32_OWN_PROCESS, /* Service type */
633633
dwStartType, /* Start type */
634634
SERVICE_ERROR_NORMAL, /* Error control */
635635
fossil_utf8_to_unicode(blob_str(&binPath)), /* Binary path */
636636
NULL, /* Load ordering group */
637637
NULL, /* Tag value */
638638
NULL, /* Service dependencies */
639
- fossil_utf8_to_unicode(zUsername), /* Service account */
640
- fossil_utf8_to_unicode(zPassword) /* Account password */
639
+ fossil_utf8_to_unicode(zUsername), /* Service account */
640
+ fossil_utf8_to_unicode(zPassword) /* Account password */
641641
);
642642
if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
643643
/* Set the service description. */
644644
ChangeServiceConfig2W(hSvc, SERVICE_CONFIG_DESCRIPTION, &svcDescr);
645645
fossil_print("Service '%s' successfully created.\n", zSvcName);
@@ -658,11 +658,12 @@
658658
}else if( g.argc>4 ){
659659
fossil_fatal("to much arguments for delete method.");
660660
}
661661
hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);
662662
if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
663
- hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName), SERVICE_ALL_ACCESS);
663
+ hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName),
664
+ SERVICE_ALL_ACCESS);
664665
if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
665666
QueryServiceStatus(hSvc, &sstat);
666667
if( sstat.dwCurrentState!=SERVICE_STOPPED ){
667668
fossil_print("Stopping service '%s'", zSvcName);
668669
if( sstat.dwCurrentState!=SERVICE_STOP_PENDING ){
@@ -808,11 +809,12 @@
808809
}else if( g.argc>4 ){
809810
fossil_fatal("to much arguments for start method.");
810811
}
811812
hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);
812813
if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
813
- hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName), SERVICE_ALL_ACCESS);
814
+ hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName),
815
+ SERVICE_ALL_ACCESS);
814816
if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
815817
QueryServiceStatus(hSvc, &sstat);
816818
if( sstat.dwCurrentState!=SERVICE_RUNNING ){
817819
fossil_print("Starting service '%s'", zSvcName);
818820
if( sstat.dwCurrentState!=SERVICE_START_PENDING ){
@@ -844,11 +846,12 @@
844846
}else if( g.argc>4 ){
845847
fossil_fatal("to much arguments for stop method.");
846848
}
847849
hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);
848850
if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
849
- hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName), SERVICE_ALL_ACCESS);
851
+ hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName),
852
+ SERVICE_ALL_ACCESS);
850853
if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
851854
QueryServiceStatus(hSvc, &sstat);
852855
if( sstat.dwCurrentState!=SERVICE_STOPPED ){
853856
fossil_print("Stopping service '%s'", zSvcName);
854857
if( sstat.dwCurrentState!=SERVICE_STOP_PENDING ){
855858
--- src/winhttp.c
+++ src/winhttp.c
@@ -624,22 +624,22 @@
624 /* Create the service. */
625 hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);
626 if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
627 hSvc = CreateServiceW(
628 hScm, /* Handle to the SCM */
629 fossil_utf8_to_unicode(zSvcName), /* Name of the service */
630 fossil_utf8_to_unicode(zDisplay), /* Display name */
631 SERVICE_ALL_ACCESS, /* Desired access */
632 SERVICE_WIN32_OWN_PROCESS, /* Service type */
633 dwStartType, /* Start type */
634 SERVICE_ERROR_NORMAL, /* Error control */
635 fossil_utf8_to_unicode(blob_str(&binPath)), /* Binary path */
636 NULL, /* Load ordering group */
637 NULL, /* Tag value */
638 NULL, /* Service dependencies */
639 fossil_utf8_to_unicode(zUsername), /* Service account */
640 fossil_utf8_to_unicode(zPassword) /* Account password */
641 );
642 if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
643 /* Set the service description. */
644 ChangeServiceConfig2W(hSvc, SERVICE_CONFIG_DESCRIPTION, &svcDescr);
645 fossil_print("Service '%s' successfully created.\n", zSvcName);
@@ -658,11 +658,12 @@
658 }else if( g.argc>4 ){
659 fossil_fatal("to much arguments for delete method.");
660 }
661 hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);
662 if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
663 hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName), SERVICE_ALL_ACCESS);
 
664 if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
665 QueryServiceStatus(hSvc, &sstat);
666 if( sstat.dwCurrentState!=SERVICE_STOPPED ){
667 fossil_print("Stopping service '%s'", zSvcName);
668 if( sstat.dwCurrentState!=SERVICE_STOP_PENDING ){
@@ -808,11 +809,12 @@
808 }else if( g.argc>4 ){
809 fossil_fatal("to much arguments for start method.");
810 }
811 hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);
812 if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
813 hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName), SERVICE_ALL_ACCESS);
 
814 if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
815 QueryServiceStatus(hSvc, &sstat);
816 if( sstat.dwCurrentState!=SERVICE_RUNNING ){
817 fossil_print("Starting service '%s'", zSvcName);
818 if( sstat.dwCurrentState!=SERVICE_START_PENDING ){
@@ -844,11 +846,12 @@
844 }else if( g.argc>4 ){
845 fossil_fatal("to much arguments for stop method.");
846 }
847 hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);
848 if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
849 hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName), SERVICE_ALL_ACCESS);
 
850 if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
851 QueryServiceStatus(hSvc, &sstat);
852 if( sstat.dwCurrentState!=SERVICE_STOPPED ){
853 fossil_print("Stopping service '%s'", zSvcName);
854 if( sstat.dwCurrentState!=SERVICE_STOP_PENDING ){
855
--- src/winhttp.c
+++ src/winhttp.c
@@ -624,22 +624,22 @@
624 /* Create the service. */
625 hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);
626 if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
627 hSvc = CreateServiceW(
628 hScm, /* Handle to the SCM */
629 fossil_utf8_to_unicode(zSvcName), /* Name of the service */
630 fossil_utf8_to_unicode(zDisplay), /* Display name */
631 SERVICE_ALL_ACCESS, /* Desired access */
632 SERVICE_WIN32_OWN_PROCESS, /* Service type */
633 dwStartType, /* Start type */
634 SERVICE_ERROR_NORMAL, /* Error control */
635 fossil_utf8_to_unicode(blob_str(&binPath)), /* Binary path */
636 NULL, /* Load ordering group */
637 NULL, /* Tag value */
638 NULL, /* Service dependencies */
639 fossil_utf8_to_unicode(zUsername), /* Service account */
640 fossil_utf8_to_unicode(zPassword) /* Account password */
641 );
642 if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
643 /* Set the service description. */
644 ChangeServiceConfig2W(hSvc, SERVICE_CONFIG_DESCRIPTION, &svcDescr);
645 fossil_print("Service '%s' successfully created.\n", zSvcName);
@@ -658,11 +658,12 @@
658 }else if( g.argc>4 ){
659 fossil_fatal("to much arguments for delete method.");
660 }
661 hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);
662 if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
663 hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName),
664 SERVICE_ALL_ACCESS);
665 if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
666 QueryServiceStatus(hSvc, &sstat);
667 if( sstat.dwCurrentState!=SERVICE_STOPPED ){
668 fossil_print("Stopping service '%s'", zSvcName);
669 if( sstat.dwCurrentState!=SERVICE_STOP_PENDING ){
@@ -808,11 +809,12 @@
809 }else if( g.argc>4 ){
810 fossil_fatal("to much arguments for start method.");
811 }
812 hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);
813 if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
814 hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName),
815 SERVICE_ALL_ACCESS);
816 if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
817 QueryServiceStatus(hSvc, &sstat);
818 if( sstat.dwCurrentState!=SERVICE_RUNNING ){
819 fossil_print("Starting service '%s'", zSvcName);
820 if( sstat.dwCurrentState!=SERVICE_START_PENDING ){
@@ -844,11 +846,12 @@
846 }else if( g.argc>4 ){
847 fossil_fatal("to much arguments for stop method.");
848 }
849 hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS);
850 if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
851 hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName),
852 SERVICE_ALL_ACCESS);
853 if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg());
854 QueryServiceStatus(hSvc, &sstat);
855 if( sstat.dwCurrentState!=SERVICE_STOPPED ){
856 fossil_print("Stopping service '%s'", zSvcName);
857 if( sstat.dwCurrentState!=SERVICE_STOP_PENDING ){
858

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button