bugTransport Sample Protocol - Bugs: bug #17982, argc and argv in tsp_xxx_init

 
 

bug #17982: argc and argv in tsp_xxx_init

Submitter:  Alan <pratal>
Submitted:  Thu 12 Oct 2006 01:42:36 PM UTC
   
 
Category:  Core Severity:  3 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Release:  * 0.8.0 Fixed Release:  * Unknown
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 24 Jan 2007 06:39:05 PM UTC, comment #1: 

This looks like a programming error.

Try allocation sizeof(char*) instead of sizeof(char).


Robert de Vries <rhdv>
Group Member
Thu 12 Oct 2006 01:42:36 PM UTC, original submission:  

_EXPORT_TSP_PROVIDER int32_t
TSP_provider_init(GLU_handle_t* theGLU, int* argc, char** argv[]);

_EXPORT_TSP_CONSUMER int32_t
TSP_consumer_init(int* argc, char** argv[]);

In MFC application there is not always a main so argc and argv have to be declared :

int argc = 9;
char** argv = 0;

argv = (char**)calloc(argc, sizeof(char*));

argv[0] = strdup("tsp_stdout_client");
argv[1] = ...

TSP_consumer_init(&argc, &argv)

Alan <pratal>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rhdv (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code