Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
fix context values
[src/app-framework-binder.git]
/
src
/
main.c
diff --git
a/src/main.c
b/src/main.c
index
95b5a65
..
15f84b1
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-26,12
+26,14
@@
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <stdint.h>
#include "afb-plugin.h"
#include "local-def.h"
#include "afb-apis.h"
#include "session.h"
#include "afb-plugin.h"
#include "local-def.h"
#include "afb-apis.h"
#include "session.h"
+#include "verbose.h"
#if !defined(PLUGIN_INSTALL_DIR)
#error "you should define PLUGIN_INSTALL_DIR"
#if !defined(PLUGIN_INSTALL_DIR)
#error "you should define PLUGIN_INSTALL_DIR"
@@
-255,7
+257,7
@@
static void parse_arguments(int argc, char *argv[], AFB_session *session)
switch (optc)
{
case SET_VERBOSE:
switch (optc)
{
case SET_VERBOSE:
- verbos
e = 1
;
+ verbos
ity++
;
break;
case SET_TCP_PORT:
break;
case SET_TCP_PORT:
@@
-276,19
+278,19
@@
static void parse_arguments(int argc, char *argv[], AFB_session *session)
case SET_ROOT_DIR:
if (optarg == 0) goto needValueForOption;
session->config->rootdir = optarg;
case SET_ROOT_DIR:
if (optarg == 0) goto needValueForOption;
session->config->rootdir = optarg;
- if (verbos
e
) fprintf(stderr, "Forcing Rootdir=%s\n",session->config->rootdir);
+ if (verbos
ity
) fprintf(stderr, "Forcing Rootdir=%s\n",session->config->rootdir);
break;
case SET_ROOT_BASE:
if (optarg == 0) goto needValueForOption;
session->config->rootbase = optarg;
break;
case SET_ROOT_BASE:
if (optarg == 0) goto needValueForOption;
session->config->rootbase = optarg;
- if (verbos
e
) fprintf(stderr, "Forcing Rootbase=%s\n",session->config->rootbase);
+ if (verbos
ity
) fprintf(stderr, "Forcing Rootbase=%s\n",session->config->rootbase);
break;
case SET_ROOT_API:
if (optarg == 0) goto needValueForOption;
session->config->rootapi = optarg;
break;
case SET_ROOT_API:
if (optarg == 0) goto needValueForOption;
session->config->rootapi = optarg;
- if (verbos
e
) fprintf(stderr, "Forcing Rootapi=%s\n",session->config->rootapi);
+ if (verbos
ity
) fprintf(stderr, "Forcing Rootapi=%s\n",session->config->rootapi);
break;
case SET_ALIAS:
break;
case SET_ALIAS:
@@
-300,7
+302,7
@@
static void parse_arguments(int argc, char *argv[], AFB_session *session)
} else {
aliasdir[aliascount].path = optarg;
aliasdir[aliascount].len = strlen(aliasdir[aliascount].url);
} else {
aliasdir[aliascount].path = optarg;
aliasdir[aliascount].len = strlen(aliasdir[aliascount].url);
- if (verbos
e
) fprintf(stderr, "Alias url=%s path=%s\n", aliasdir[aliascount].url, aliasdir[aliascount].path);
+ if (verbos
ity
) fprintf(stderr, "Alias url=%s path=%s\n", aliasdir[aliascount].url, aliasdir[aliascount].path);
aliascount++;
}
} else {
aliascount++;
}
} else {
@@
-581,19
+583,19
@@
int main(int argc, char *argv[]) {
exit (1);
}
#endif
exit (1);
}
#endif
- if (verbos
e
) fprintf (stderr, "AFB: notice Init config done\n");
+ if (verbos
ity
) fprintf (stderr, "AFB: notice Init config done\n");
// ---- run in foreground mode --------------------
if (session->foreground) {
// ---- run in foreground mode --------------------
if (session->foreground) {
- if (verbos
e
) fprintf (stderr,"AFB: notice Foreground mode\n");
+ if (verbos
ity
) fprintf (stderr,"AFB: notice Foreground mode\n");
} // end foreground
// --------- run in background mode -----------
if (session->background) {
} // end foreground
// --------- run in background mode -----------
if (session->background) {
- if (verbos
e
) printf ("AFB: Entering background mode\n");
+ if (verbos
ity
) printf ("AFB: Entering background mode\n");
daemonize(session);
daemonize(session);
@@
-605,7
+607,7
@@
int main(int argc, char *argv[]) {
listenLoop(session);
listenLoop(session);
- if (verbos
e
) printf ("\n---- Application Framework Binder Normal End ------\n");
+ if (verbos
ity
) printf ("\n---- Application Framework Binder Normal End ------\n");
exit(0);
}
exit(0);
}