~ubuntu-branches/debian/sid/ion/sid

« back to all changes in this revision

Viewing changes to bp/utils/lgagent.c

  • Committer: Package Import Robot
  • Author(s): Leo Iannacone, Leo Iannacone, Alessio Treglia
  • Date: 2012-06-06 15:05:10 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120606150510-8i80bn0vxwojt76n
Tags: 3.0.1~dfsg1-1
[ Leo Iannacone ]
* New upstream release.
* New patch to fix ftbfs onto kfreebsd systems.
* Refreshed old patches.
* Overrides-lintian false positive about hardening flags.

[ Alessio Treglia ]
* New patch to add pthread libs to libbss's linking
* Required debhelper > 9 to enable hardening flags.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 
10
10
#include <bp.h>
11
11
 
12
 
static BpSAP    _bpsap(BpSAP *newSAP)
 
12
static BpSAP    _bpsap(BpSAP *newSap)
13
13
{
14
 
        static BpSAP    sap = NULL;
 
14
        void    *value;
 
15
        BpSAP   sap;
15
16
        
16
 
        if (newSAP)
17
 
        {
18
 
                sap = *newSAP;
19
 
                sm_TaskVarAdd((int *) &sap);
 
17
        if (newSap)                     /*      Add task variable.      */
 
18
        {
 
19
                value = (void *) (*newSap);
 
20
                sap = (BpSAP) sm_TaskVar(&value);
 
21
        }
 
22
        else                            /*      Retrieve task variable. */
 
23
        {
 
24
                sap = (BpSAP) sm_TaskVar(NULL);
20
25
        }
21
26
 
22
27
        return sap;
24
29
 
25
30
static int      _running(int *newState)
26
31
{
27
 
        static int      state = 1;
28
 
 
29
 
        if (newState)
30
 
        {
31
 
                state = *newState;
32
 
        }
33
 
 
34
 
        return state;
 
32
        void    *value = NULL;
 
33
        BpSAP   sap;
 
34
 
 
35
        if (newState)                   /*      Only used for Stop.     */
 
36
        {
 
37
                sap = (BpSAP) sm_TaskVar(&value);
 
38
        }
 
39
        else                            /*      Retrieve task variable. */
 
40
        {
 
41
                sap = (BpSAP) sm_TaskVar(NULL);
 
42
        }
 
43
 
 
44
        return (sap == NULL ? 0 : 1);
35
45
}
36
46
 
37
47
static void     handleQuit()
38
48
{
39
49
        int     stop = 0;
40
50
 
 
51
        bp_interrupt(_bpsap(NULL));
41
52
        oK(_running(&stop));
42
 
        bp_interrupt(_bpsap(NULL));
43
53
}
44
54
 
45
55
static void     closeOpsFile(int *opsFile)
238
248
        return 0;
239
249
}
240
250
 
241
 
#if defined (VXWORKS) || defined (RTEMS)
 
251
#if defined (VXWORKS) || defined (RTEMS) || defined (bionic)
242
252
int     lgagent(int a1, int a2, int a3, int a4, int a5,
243
253
                int a6, int a7, int a8, int a9, int a10)
244
254
{