Changeset 856

Show
Ignore:
Timestamp:
25/05/09 17:18:50 (4 years ago)
Author:
blogic
Message:

several fonstated fixes and disable online plugin

Location:
trunk/fon/fonstate
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/fon/fonstate/files/etc/init.d/fonstate

    r1 r856  
    11#!/bin/sh /etc/rc.common 
    22 
    3 START=70 
     3START=96 
    44 
    55start() { 
  • trunk/fon/fonstate/src/Makefile

    r841 r856  
    77OBJS=main.o lib/log.o lib/uci.o lib/sys.o fon/state.o net/socket.o plugin/plugin.o lib/signal.o net/net_helper.o lib/ps.o 
    88 
    9 all: $(PROGS) fonstate_online.so fonstate_chilli.so 
     9all: $(PROGS) fonstate_chilli.so 
    1010 
    1111$(PROGS): $(OBJS) 
     
    1515#       $(CC) $(CFLAGS) -o $@ $^ -shared 
    1616 
    17 fonstate_online.so: plugin/online.c 
    18         $(CC) $(CFLAGS) -o $@ $^ -shared 
     17#fonstate_online.so: plugin/online.c 
     18#       $(CC) $(CFLAGS) -o $@ $^ -shared 
    1919 
    2020fonstate_chilli.so: plugin/chilli.c 
  • trunk/fon/fonstate/src/lib/log.c

    r1 r856  
    2323 
    2424extern int daemonize; 
     25int log_open = 0; 
     26 
     27void start_log(void) 
     28{ 
     29        if(log_open) 
     30                return; 
     31        openlog("fonstated", 0, 0); 
     32} 
    2533 
    2634void log_printf(char *fmt, ...) 
     
    3442 
    3543        if(daemonize) 
     44        { 
    3645                syslog(10, p); 
    37         else 
     46                start_log(); 
     47        } else { 
    3848                printf(p); 
     49        } 
    3950}