Example #1
0
static int start_smsc(Cfg *cfg)
{
    static int started = 0;
    if (started) return 0;

    smsbox_start(cfg);

    smsc2_start(cfg);

    started = 1;
    return 0;
}
Example #2
0
static int start_smsc(Cfg *cfg)
{
    static int started = 0;

    if (started) 
        return 0;

    if (smsbox_start(cfg) == -1) {
        error(0, "Unable to start smsbox module.");
        return -1;
    }

    if (smsc2_start(cfg) == -1) {
        error(0, "Unable to start smsc module.");
        return -1;
    }

    started = 1;
    return 0;
}