Menu

#1881 hpisettime exits prematurely with return code 1

3.6.0
closed-fixed
OpenHPI Daemon Client
5
2015-08-11
2015-06-22
No

The hpisettime command exits prematurely with an exit code of 1 when valid parameters are provided.

---uname output---
Linux rhel7-server2 3.10.0-123.el7.ppc64 #1 SMP Mon May 5 11:18:37 EDT 2014 ppc64 ppc64 ppc64 GNU/Linux

---Steps to Reproduce---
=== steps to reproduce ===
export G_MESSAGES_DEBUG=all
hpisettime -t 12:00:00 -d 03/12/2015 -X
echo $?
==================

The problem has been isolated to this line of code in clients/hpisettime.c

if (rv != SA_OK) EXIT1;

Brackets are required around the EXIT1 macro
since it expands to multiple executable statements:
#define EXIT1 g_free(findate);g_free(fintime);return 1;

1 Attachments

Related

Bugs: #1881

Discussion

  • Hemantha Beecherla

    Hi ,

    The patch attached on top of the bug looks great. Thanks for fixing the bug.

    Thanks& Regards,
    Hemantha Reddy

    From: Rafael Fonseca [mailto:rdossant@users.sf.net]
    Sent: Monday, June 22, 2015 9:58 AM
    To: Ticket 1881
    Subject: [openhpi:bugs] #1881 hpisettime exits prematurely with return code 1


    [bugs:#1881]http://sourceforge.net/p/openhpi/bugs/1881 hpisettime exits prematurely with return code 1

    Status: open
    3.6.0: 3.6.0
    Created: Mon Jun 22, 2015 03:58 PM UTC by Rafael Fonseca
    Last Updated: Mon Jun 22, 2015 03:58 PM UTC
    Owner: nobody

    The hpisettime command exits prematurely with an exit code of 1 when valid parameters are provided.

    ---uname output---
    Linux rhel7-server2 3.10.0-123.el7.ppc64 #1 SMP Mon May 5 11:18:37 EDT 2014 ppc64 ppc64 ppc64 GNU/Linux

    ---Steps to Reproduce---
    === steps to reproduce ===
    export G_MESSAGES_DEBUG=all
    hpisettime -t 12:00:00 -d 03/12/2015 -X
    echo $?
    ==================

    The problem has been isolated to this line of code in clients/hpisettime.c

    if (rv != SA_OK) EXIT1;

    Brackets are required around the EXIT1 macro
    since it expands to multiple executable statements:

    define EXIT1 g_free(findate);g_free(fintime);return 1;


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/openhpi/bugs/1881/https://sourceforge.net/p/openhpi/bugs/1881

    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/https://sourceforge.net/auth/subscriptions

     

    Related

    Bugs: #1881

  • Hemantha Beecherla

    Fixed in Trunk 3.6.0 with Revision 7633.

     
  • Hemantha Beecherla

    • status: open --> closed-fixed
    • assigned_to: Hemantha Beecherla
     
  • dr_mohan

    dr_mohan - 2015-08-10
    • labels: --> OpenHPI Daemon Client
     
  • dr_mohan

    dr_mohan - 2015-08-11
    • labels: OpenHPI Daemon Client --> HPI Clients
    • Subsystem: OpenHPI Daemon Client --> HPI Clients
     
  • dr_mohan

    dr_mohan - 2015-08-11
    • labels: HPI Clients --> OpenHPI Daemon Client
    • Subsystem: HPI Clients --> OpenHPI Daemon Client