If gi->job is NULL, it always returns EINA_FALSE.
But if it returns EINA_FALSE, gi->job can be NULL or not.

For application developers, return value checking is above all when
checking error. (Also in documentation)

2011/11/6 Kim Yunhan <[email protected]>:
> Is there any case ret is EINA_FALSE and gi->job is not NULL?
> 2011. 11. 6. 오후 12:03에 "Bluezery" <[email protected]>님이 작성:
>
>> Dear all,
>>
>> elm_map only checked that returned job is NULL.
>> But ecore_file_download_full() returns EINA_FALSE when error occurred.
>> So return value should be checked for proper usage.
>> Please review this simple bug fix
>>
>>
>> Index: src/lib/elm_map.c
>> ===================================================================
>> --- src/lib/elm_map.c   (리비전 64791)
>> +++ src/lib/elm_map.c   (작업 사본)
>> @@ -1284,9 +1284,9 @@ _process_download_list(Evas_Object *obj)
>>         if (gi->wd->download_num >= MAX_CONCURRENT_DOWNLOAD)
>>           break;
>>
>> -        ecore_file_download_full(gi->source, gi->file,
>> _tile_downloaded, NULL, gi, &(gi->job), wd->ua);
>> -        if (!gi->job)
>> -          DBG("Can't start to download %s to %s", gi->source, gi->file);
>> +        Eina_Bool ret = ecore_file_download_full(gi->source,
>> gi->file, _tile_downloaded, NULL, gi, &(gi->job), wd->ua);
>> +        if (!ret || !gi->job)
>> +          WRN("Can't start to download %s to %s", gi->source, gi->file);
>>         else
>>           {
>>              gi->wd->download_num++;
>>
>>
>>
>> Thanks,
>> Kim.
>>
>>
>> ------------------------------------------------------------------------------
>> RSA(R) Conference 2012
>> Save $700 by Nov 18
>> Register now
>> http://p.sf.net/sfu/rsa-sfdev2dev1
>> _______________________________________________
>> enlightenment-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to